#P130D. Exponentiation

Exponentiation

No submission language available for this problem.

Description

You are given integers a, b and c. Calculate ab modulo c.

Input data contains numbers a, b and c, one number per line. Each number is an integer between 1 and 100, inclusive.

Output ab mod c.

Input

Input data contains numbers a, b and c, one number per line. Each number is an integer between 1 and 100, inclusive.

Output

Output ab mod c.

Samples

Sample Input 1

2
5
40

Sample Output 1

32

Sample Input 2

2
5
26

Sample Output 2

6