A Very Simple Problem
Hard
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
This is a very simple problem. Given three integers N, x, and M, your task is to calculate out the following value:
Input
There are several test cases. For each case, there is a line with three integers N, x, and M, where 1 ≤ N, M ≤ 2·10^9, and 1 ≤ x ≤ 50.
The input ends up with three negative numbers, which should not be processed as a case.
Output
For each test case, print a line with an integer indicating the result.
Examples
Input #1
Answer #1
Submissions 1K
Acceptance rate 9%