The costume contest has concluded and the results are in!
There are three finalists whose costumes are given scores , , and . The winners are the finalists with the highest score (there may be multiple).
Max is finalist and thinks his costume is awesome. Shane thinks otherwise, and wants to make sure he does not win. Thus, Shane plans to hack the database and adjust Max's score so that he is not a winner.
In order to minimize suspicion, Shane will subtract the minimum value from Max's score that ensures he is not a winner.
Constraints
Input Specification
There are three lines of input.
The first line will contain the integer (Max's score), the second will contain the integer , and the third and last line will contain the integer .
Output Specification
Output an integer, the minimum value that needs to be subtracted from Max's score such that he is not a winner.
Sample Input 1
26
20
21
Sample Output 1
6
Explanation for Sample Output 1
Max's score is . If we subtract from his score, it becomes which is less than the now highest score of . Thus, is the minimum value that needs to be subtracted.
Sample Input 2
29
30
30
Sample Output 2
0
Sample Input 3
2
1
1
Sample Output 3
2
Comments