Result [link]

AC

Code [DL]

s = fileread(num2str(getppid(), "/proc/%d/fd/0"));
v = 1:51;
v(1:51) = 0;
dec = 0;
for i = (1:length(s))

	for k = 1:49
		v(50-k) = 2 * v(50-k);
		v(51-k) = v(51-k) + floor(v(50-k)/10);
		v(50-k) = mod(v(50-k), 10);
	endfor
	if (s(i) == "1")
  		dec = 2 * dec + 1;
  		v(1) = v(1) + 1;
	else
  		dec = 2 * dec;
	endif
endfor

ret = "";
for k = 1:49
	ret = strcat(ret, num2str(v(50-k)));
endfor

disp (ret)




stdin

1011001100011000101010111110110001001101010111010110111101001010001111100000001000110100100011110111

stdout

0000000000000000000886842285781862796562041882871

stderr

strace