main(s,a){for(;gets(&s);putchar(48+(a*a/s)))a=sqrt(s=strtol(&s,0,2)*8+1);}