e-olymp
Problems

Integer multiplication

Integer multiplication

Three integers a, b, c are given. Find the value of expression a * b mod c.

Input

Three positive integers a, b, c (a, b, c < 263).

Output

Print the value of expression a * b mod c.

Time limit 1 second
Memory limit 128 MiB
Input example #1
1000000000007 10000000000005 1000000000000003

Output example #1
74970000000035