main(s){for(;gets(&s);putchar(48.0+fmod(sqrt(strtol(&s,0,2)*8+1),1)));}