Result

AC

Code [DL]

cin=new java.util.Scanner(java.lang.System.in);
for(;cin.hasNext();){
   l= cin.nextLine();
    print(+!((Math.sqrt(8*parseInt(l,2)+1)-1)%2)); 
}

stdin

01010110
01011011
10011001
01111011
00010000
00101101
00100101
00100100
00000000
00001010
10100101
00000001
11110010
11000000
00110100
11011001
00000011
00000001
01101001
01000010
10000001
10001000
00000110
11100111
00110111
10010101
11000111
10111011
00101110
00011100
00110110
00010010
11111101
10111110
11011100
00110010
10101011
01111000
10000011
00010101
11100101
00001111
10111110
00111000
01011101
10101101
11010010
10000101
01001110
01010101

stdout

0
1
1
0
0
1
0
1
1
1
0
1
0
0
0
0
1
1
1
1
0
1
1
1
1
0
0
0
0
1
0
0
1
1
0
0
1
1
0
1
0
1
1
0
0
0
1
0
1
0

stderr

strace