Page not loading? Try clicking here.
Placeholder

#2814

Binary number 1s 128MB

Problems

Computers internally use only the digits 0 and 1 to operate all programs.

A number composed of only these two digits is called a binary number.

Write a program that, given a binary number as input, converts it to a decimal number and prints the result.


Input

A binary number of at most 30 digits, consisting only of 0s and 1s.


Output

Print the decimal equivalent of the input binary number.


Example #1

10101
21

Example #2

111111111111111111111111111111
1073741823


Source

jungol

You must sign in to write code.