Convert Binary to Decimal Numbers

In computer science, numbers are often represented in binary form. Your task is to develop a program that reads such a binary string from the input and outputs its decimal (base-10) equivalent.

Input

The only line of the input contains the string s consisting of 0s and 1s (1 ≤ |s| ≤ 31).

Output

A single integer, representing the decimal equivalent of the binary string.

Examples

Input

Output

101

5

110

6

111

7

0100110111

311

Constraints

Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue