#include <stdio.h>
int main() {
char c;
unsigned int dec = 0, i = 1;
char bits[32];
int bit_corrente = 0;
bits[bit_corrente++] = c - '0';
}
int j;
for (j = bit_corrente - 1;j >= 0; --j){
if (bits[j] == 1){
dec += i;
}
i *= 2;
}
return 0;
}
I2luY2x1ZGUgPHN0ZGlvLmg+CgppbnQgbWFpbigpIHsKICAgIGNoYXIgYzsKICAgIHVuc2lnbmVkIGludCBkZWMgPSAwLCBpID0gMTsKCiAgICBjaGFyIGJpdHNbMzJdOwogICAgaW50IGJpdF9jb3JyZW50ZSA9IDA7CiAgICB3aGlsZSAoKGMgPSBnZXRjaGFyKCkpICE9ICdcbicpIHsKICAgICAgICBiaXRzW2JpdF9jb3JyZW50ZSsrXSA9IGMgLSAnMCc7CiAgICB9CgogICAgaW50IGo7CiAgICBmb3IgKGogPSBiaXRfY29ycmVudGUgLSAxO2ogPj0gMDsgLS1qKXsKICAgICAgICBpZiAoYml0c1tqXSA9PSAxKXsKICAgICAgICAgICAgZGVjICs9IGk7CiAgICAgICAgfQogICAgICAgIGkgKj0gMjsKICAgIH0KCiAgICBwcmludGYoIiVkXG4iLCBkZWMpOwogICAgcmV0dXJuIDA7Cn0K