MCPC Summer Training

Start

2018-07-11 19:00 UTC

MCPC Summer Training

End

2018-07-11 21:00 UTC
The end is near!
Contest is over.
Not yet started.
Contest is starting in -313 days 8:12:07

Time elapsed

2:00:00

Time remaining

0:00:00

Problem A
Cetiri

Mirko has chosen four integers which form an arithmetic progression. In other words, when the four numbers are sorted, then the difference between each pair of adjacent elements is constant.

As has become usual, Mirko lost one of the numbers and also is not sure whether the remaining three are in the correct (sorted) order.

Write a program that, given the three remaining numbers, finds the fourth number.

Input

The input contains 3 integers between $-100$ and $100$ on a single line, separated by single spaces.

Note: the input data will guarantee that a solution, although not necessarily unique, will always exist.

Output

Output any number which could have been the fourth number in the sequence.

Sample Input 1 Sample Output 1
4 6 8
10
Sample Input 2 Sample Output 2
10 1 4
7