Input
The input will be two lines.
The first line is the first number of the series consisting of two or more digits (>= 10).
The second figure is the number of elements the series will have including the initial number.
Both numbers will be positive, non-zero, integers. The first will be <= 1000000 and the second will be <= 1000.
Output
The output will be a single number corresponding to the Nth element calculated for the series.
Input
23 11
Output
115
Input
1234 332
Output
6655