CCCGuide

Problem J2: Shifty Sum

2017 · J2 · Original problem · DMOJ

Time limit: 1 second

Problem Description

Suppose we have a number like 12. Let’s define shifting a number to mean adding a zero at the end. For example, if we shift that number once, we get the number 120. If we shift the number again we get the number 1200. We can shift the number as many times as we want.

In this problem you will be calculating a shifty sum, which is the sum of a number and the numbers we get by shifting. Specifically, you will be given the starting number NN and a non-negative integer kk. You must add together NN and all the numbers you get by shifting a total of kk times.

For example, the shifty sum when NN is 12 and kk is 1 is: 12+120=13212 + 120 = 132. As another example, the shifty sum when NN is 12 and kk is 3 is 12+120+1200+12000=1333212 + 120 + 1200 + 12000 = 13332.

Input Specification

The first line of input contains the number NN (1≤N≤10000(1 \leq N \leq 10000). The second line of input contains kk, the number of times to shift NN (0≤k≤5)(0 \leq k \leq 5).

Output Specification

Output the integer which is the shifty sum of NN by kk.

Sample Input

12
3

Output for Sample Input

13332