Primitive Calculator

View as PDF

Submit solution


Points: 1
Time limit: 1.0s
Memory limit: 256M

Problem types

Alim has a primitive calculator. It has only two buttons — digit and operation. Assume the current number on the calculator display is \(C\). The digit button appends digit \(X\) to the current number. Formally, it replaces it with \(10 · C + X\). The operation button computes the following sum

\(S = \sum\limits_{i=0}^{i<K} C · 10^i\)

and replaces the current number on the display with \(S.\) Alim’s friend Aslı is playing with the calculator. Initially the calculator displays number \(0\) (zero). First Aslı presses digit button \(N\) times. Then he presses the operation button once. What is the number on the calculator display at the end of the day?

For example if \(X = 9, N = 3, K = 4\) then the result is \(999 + 9990 + 99900 + 999000 = 1109889.\)

Input

Three integers \(X, N, K\) separated with single spaces.

Output

The result shown by the calculator.

Constraints \(1 ≤ X ≤ 9,\) \(1 ≤ N; K,\) \(N + K ≤ 10^6\).

Samples

Input (stdin)

9 3 4

Output (stdout)

1109889