1068: binary number
Title Description
A binary number into a corresponding decimal number.
Entry
Enter a binary number, ending with a carriage return. The binary number is a positive number, length is not more than 31.
Export
Output an integer, the binary number for the corresponding decimal number.
Sample input
100000000001
Sample Output
2049
d=0
ch=input()
for i in ch:
d=d*2+int(i)
print("%d"%d)