#include<stdio.h>
#include<string.h>
#include<math.h>
int main()
{
char bin[100];
unsigned long dec = 0;
int i = 0;
int s;
fgets( bin
, sizeof(bin
), stdin
); while( s-- ) {
if( bin[s] == '0' || bin[s] == '1' ) {
dec
= dec
+ pow(2, i
++) * (bin
[s
] - '0'); }
};
printf("\nDecimal Equivalent of Binary Number: \t %u\n", dec
); return 0;
}
I2luY2x1ZGU8c3RkaW8uaD4KI2luY2x1ZGU8c3RyaW5nLmg+CiNpbmNsdWRlPG1hdGguaD4KCmludCBtYWluKCkKewogICAgY2hhciBiaW5bMTAwXTsKICAgIHVuc2lnbmVkIGxvbmcgZGVjID0gMDsKICAgIGludCBpID0gMDsKICAgIGludCBzOwogICAgZmdldHMoIGJpbiwgc2l6ZW9mKGJpbiksIHN0ZGluKTsKICAgIHMgPSBzdHJsZW4oIGJpbiApOwogICAgd2hpbGUoIHMtLSApIHsKICAgIAlpZiggYmluW3NdID09ICcwJyB8fCBiaW5bc10gPT0gJzEnICkgewogICAgCQlkZWMgPSBkZWMgKyBwb3coMiwgaSsrKSAqIChiaW5bc10gLSAnMCcpOwogICAgCX0KICAgIH07CiAgICBwcmludGYoIlxuRGVjaW1hbCBFcXVpdmFsZW50IG9mIEJpbmFyeSBOdW1iZXI6IFx0ICV1XG4iLCBkZWMpOwogICAgcmV0dXJuIDA7Cn0=