Since Bob has been playing too much Minecraft, he has been viewing everything in terms of Minecraft, including whenever he is hungry.
He visualizes this hunger with a hunger bar with hunger points. If he eats apples, he will gain at most hunger points since he only has at most hunger points.
To further this visualization, Bob will lose hunger point every second.
He cannot have negative hunger points.
Initially, he has hunger points when he eats the apples.
After eating the apples instantly, he will wait seconds and wants to know the state of his hunger bar.
Can you help him determine his remaining hunger points?
Constraints
Subtask 1 [50%]
Subtask 2 [50%]
Input Specification
The first line will contain an integer, , the number of hunger points he has available.
The second line will contain an integer, , the number of apples he will eat.
The third line will contain an integer, , the number of seconds he will wait.
Output Specification
Output the number of hunger points he will have after eating apples and waiting seconds.
Sample Input 1
5
3
1
Sample Output 1
2
Explanation for Sample 1
Bob eats the apples and gains hunger points. Then, he waits for second and loses hunger point, resulting in hunger points.
Sample Input 2
10
20
5
Sample Output 2
5
Explanation for Sample 2
Bob eats the apples and gains hunger points since he only has hunger slots. Then, he waits for seconds and loses hunger points, resulting in hunger points.
Sample Input 3
1
50
1000
Sample Output 3
0
Explanation for Sample 3
Bob eats the apples and gains hunger point since he only has hunger slot. Then, he waits seconds and loses hunger point, resulting in hunger points.
Comments
I am wonder how hungry he is if he eats that much.
How long has Bob been playing Minecraft for?
blocc game :3