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