Parsa has invited everyone from the MAPS Beginner Competition to a tea party. He has exactly three teapots, each with infinite capacity. The first teapot contains litres of tea, the second one contains
litres, and the third one contains
litres, where
,
, and
are non-negative integers.
Parsa believes in equality, so he wants all the teapots to have the exact same amount of tea. In one step, he can pour any real (i.e. fractional allowed) amount of tea from one teapot to another.
Help him determine the minimum number of steps required to make all three teapots contain the same amount of tea.
Input
The only line of input contains three integers which is the initial amount of tea in each of the teapots.
Output
Print the minimum number of steps to make all the teapots have equal amount of tea.
Constraints
Example 1
Input
4 5 4
Output
2
Example 2
Input
1 3 2
Output
1
Comments