The Fourth Number

Time limit1sMemory limit128 MB

Problem

Someone chose four integers. If the four numbers are sorted in nondecreasing order and every pair of neighboring numbers has the same difference, then the four numbers form an arithmetic progression.

One of the four chosen numbers was forgotten, and only the other three numbers are remembered. Given the three remembered numbers, output any possible forgotten number.

Input

The first line contains three remembered integers separated by spaces. They may be given in any order, and each integer is between -100 and 100, inclusive.

Output

Print one integer that could be the forgotten number so that the four numbers form an arithmetic progression. If there are multiple possible answers, print any one of them. Inputs with no possible answer are not given.