Result

AC

Code [DL]

a5*>0  v
?v68*-+>2*i:a=
v>~:1+0}
<v!?:}+{=*+1:@:{:}-1
 >{n~~1-:30{?.;

stdin

01010011
10011001
00100100
00011100
00100001
10001000
00000001
01100111
00111010
01100010
00000011
11110000
01110100
00000000
10111110
11110010
00001101
10000000
01011011
00100011
01101111
00001010
00110110
10111110
01111100
01101001
01001110
11010011
01100000
11100111
11111101
00111110
11011010
01000100
00001111
00010101
10001010
00000110
11010010
00011111
10101011
00110111
01011010
11101001
01111000
11000010
00101101
11111111
00001111
01000010

stdout

01110110001001100010010101100110001101101100101011

stderr

strace