The number n is given in the base k system. Convert number n into decimal system.
Two non-negative integers k (2 ≤ k ≤ 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.
10^9