by@yamayu832
WA
import std.stdio; import std.array; import std.conv; import std.math; void main(){string s;while ((s=readln()).length>3){int i=to!int(split(s)[0],2);writeln(pow((8*i+1),.5)%2==1?1:0);}}
01011010 10011000 01011011 10111110 11100010 00110100 11100111 00001010 01000111 00000011 01101001 11011011 01010000 11111101 01001110 11001010 11011111 00001111 01001011 00101101 01010101 00000110 01000010 11111101 11101100 00110111 11010101 10001000 00000001 00100100 01011001 00011100 11000010 10110011 11010010 11010000 10101011 11000101 00010101 01111000 10111001 10101010 00011010 00000000 10100100 10000010 10011001 11111101 00001001 01100001
0 0 0 1 0 0 1 1 0 1 0 0 0 1 0 0 0 1 0 1 0 1 0 1 0 0 0 1 1 0 0 1 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 1 0 0