The number n is given in the base k system. Convert number n into decimal system.
Two non-negative integers k (2 \le k \le 10) and n.
Print one number n in the decimal system. It is guaranteed that n is no more than 10^9 in decimal notation.
Example 1
Example 2