From base k to base 10#4754

From base k to base 10

1 second
128 megabytes
Very easy

The number is given in the base system. Convert number into decimal system.

Input

Two non-negative integers (2 \le k \le 10) and .

Output

Print one number in the decimal system. It is guaranteed that is no more than 10^9 in decimal notation.

Examples

Example 1

Loading
Loading

Example 2

Loading
Loading