Module: (Python) Integer division and remainder


Problem

16 /18


Circular bike ride

Problem

In the village of Kruglaya, the first houses were built along the main ring road M kilometers long. These houses are numbered from 1 to M. Vasily leads a healthy lifestyle and cycles K kilometers on this road every day. Today he started moving from the house with the number S. Near which house will he finish his bike ride today? Vasily always moves towards increasing the numbers of houses.

Input
The program receives three lines as input. The first line contains the number M (1 <= M <= 100) -  length of the main ring road. The second line contains the number K (1 <= K <= 105) - the number of kilometers that Vasily travels along this road. The third line contains the number S (1 <= S <= M) - the number of the house from which Vasily started moving.

Imprint
Display the answer to the problem.
 
Examples
# Input Output
1 12
2
3
5
2 12
12
1
1