Result

WA

Code [DL]

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);write(pow((8*i+1),.5)%2==1?1:0);}}

stdin

00100100
00000000
01101001
10011100
01111000
11100101
01111101
10111110
11101101
00011100
10100100
00001010
00010001
10111000
11111001
01110011
00000110
00011110
00100010
00011010
11000101
10011001
10101011
00100100
00011111
01000010
00110111
01000100
00101101
00000011
11110100
01100010
01111011
00001010
11001100
00110101
10011111
01011010
00100000
00000001
01001110
11111101
00010101
00001111
10001000
01011011
11100111
01110111
01110101
11010010

stdout

01000001010100001000001000001100010000010101101000

stderr

strace