eolymp
bolt
Try our new interface for solving problems
Problems

Complementary code - 2

Complementary code - 2

The number is given in binary complement code. Print the decimal notation of this number.

Input

One string S (2 ≤ |S| ≤ 16) that contains sequence of 0 and 1.

Output

Print the number in decimal notation .

Time limit 1 second
Memory limit 128 MiB
Input example #1
00000101
Output example #1
5
Input example #2
11111011
Output example #2
-5