401689: GYM100514 A Bank

Memory Limit:64 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

A. Banktime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard output

You are given an encrypted number, encrypted using a certain algorithm.Decrypt it !

Input

The first line contains keys, n, e (1 ≤ n, e ≤ 106).

Next line contains encrypted number

Output

Print the original number.

ExamplesInput
2461 2007
2097
Output
2175
Input
65783 58199
53581
Output
12356
Input
409763 128561
82222
Output
311454

Source/Category

加入题单

上一题 下一题 算法标签: