by@hakatashi
AC
importPackage(java.io);importPackage(java.lang);s=new BufferedReader(new InputStreamReader(System.in));while(l=s.readLine()){print(+!((Math.sqrt(8*parseInt(l,2)+1)-1)%2))}
11100111 11100110 11010010 00001111 01111011 10110000 00011100 10000000 11011101 01000010 00110111 10011001 01110001 00000011 10101011 00100100 01011011 00000100 00011010 00101101 01111000 01111010 00000110 01010001 01101001 01000010 10100001 00111101 01000000 01101111 10001000 10010110 10011000 10011110 11101010 01010000 00001010 10011010 11010010 00010011 11010011 00000000 10111110 00101011 11111010 01101100 00010101 00000001 11111101 01001110
1 0 1 1 0 0 1 0 0 1 1 1 0 1 1 1 1 0 0 1 1 0 1 0 1 1 0 0 0 0 1 0 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 1 1 1