eolymp
bolt
Try our new interface for solving problems
Problems

Difference of middle

Difference of middle

Four integers a, b, c, d are given. Find the difference between the second and the third biggest element.

Input

Four integers a, b, c, d. All numbers do not exceed 30000 by absolute value.

Output

Print one number - the difference between the second and the third biggest element.

Time limit 1 second
Memory limit 128 MiB
Input example #1
4 5 7 1
Output example #1
1