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.
💡
In case you need a refresher, remember that each 1 in a binary string represents a specific power of 2. Summing these powers gives you the equivalent decimal number, starting with the rightmost bit corresponding to and so on. For instance, .
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.