Problems
From base k to base 10
From base k to base 10
The number n is given in the base k system. Convert number n into decimal system.
Input data
Two non-negative integers k (2 ≤ k ≤ 10) and n.
Output data
Print one number n in the decimal system. It is guaranteed that n is no more than 10^9
in decimal notation.
Examples
Input example #1
2 1
Output example #1
1
Input example #2
6 53414
Output example #2
7282