#include <stdio.h>
int main(void)
{
int n;//输入的二进制数字
int a,b=1;
int p;
int add=0;//结果
printf("Please enter the number(binary system):");
scanf("%d",&n);
while(n!=0){
a=n%10;
p=a*b;
b*=2;
n=n/10;
add=add+p;
}
printf("Ansswer:%d",add);
return 0;
}