by@__dAi00
AC
for i in range(50):print(0 if(1+(1+8*int(input(),2))**0.5)%2 else 1)
00000000 11101101 10111110 11001110 10110110 00000110 01011110 01101101 11111101 00111000 01101000 00000011 00110111 11100110 11000110 10101011 10001111 01101001 01100010 00100100 00000001 01011000 11100111 00001000 01011011 00011100 01001110 10001001 10001110 01001000 00011001 10000100 00000110 10110111 00101101 00001010 10101011 11110001 01111000 11010010 11001111 00110100 10001000 00010101 01000010 10111010 00001111 10101111 10011001 11011001
1 0 1 0 0 1 0 0 1 0 0 1 1 0 0 1 0 1 0 1 1 0 1 0 1 1 1 0 0 0 0 0 1 0 1 1 1 0 1 1 0 0 1 1 1 0 1 0 1 0