END{
str = $0
for(i = 0; i < 100; i++){
bin[i] = int(substr(str, i + 1, 1))
}
for(i = 0; i < 35; i++){
rem = 0
for(j = 0; j < 100; j++){
rem *= 2
rem += bin[j]
bin[j] = int(rem / 10)
rem %= 10
}
dec[i] = rem
}
deci = ""
for(i = 0; i < 35; i++){
deci = deci dec[33 - i]
}
print deci
}
RU5EewogICAgc3RyID0gJDAKICAgIGZvcihpID0gMDsgaSA8IDEwMDsgaSsrKXsKICAgICAgIGJpbltpXSA9IGludChzdWJzdHIoc3RyLCBpICsgMSwgMSkpCiAgICB9CiAgICAKICAgIGZvcihpID0gMDsgaSA8IDM1OyBpKyspewogICAgCXJlbSA9IDAKICAgICAgICBmb3IoaiA9IDA7IGogPCAxMDA7IGorKyl7CiAgICAgICAgCXJlbSAqPSAyCgkJCXJlbSArPSBiaW5bal0KCQkJYmluW2pdID0gaW50KHJlbSAvIDEwKQoJCQlyZW0gJT0gMTAKCQl9CiAgICAgICAgCiAgICAgICAgZGVjW2ldID0gcmVtCiAgICB9CiAgICAKICAgIGRlY2kgPSAiIgogICAgCiAgICBmb3IoaSA9IDA7IGkgPCAzNTsgaSsrKXsKICAgIAlkZWNpID0gZGVjaSBkZWNbMzMgLSBpXQogICAgfQogICAgCiAgICBwcmludCBkZWNpCn0=