There are three friend living on the straight line Ox in Lineland. The first friend lives at the point x_1, the second friend lives at the point x_2, and the third friend lives at the point x_3. They plan to celebrate the New Year together, so they need to meet at one point. What is the minimum total distance they have to travel in order to meet at some point and celebrate the New Year?

It's guaranteed that the optimal answer is always integer.


-----Input-----

The first line of the input contains three distinct integers x_1, x_2 and x_3 (1 ≤ x_1, x_2, x_3 ≤ 100) — the coordinates of the houses of the first, the second and the third friends respectively. 


-----Output-----

Print one integer — the minimum total distance the friends need to travel in order to meet together.


-----Examples-----
Input
7 1 4

Output
6

Input
30 20 10

Output
20



-----Note-----

In the first sample, friends should meet at the point 4. Thus, the first friend has to travel the distance of 3 (from the point 7 to the point 4), the second friend also has to travel the distance of 3 (from the point 1 to the point 4), while the third friend should not go anywhere because he lives at the point 4.

Difficulty: interview

Starter code:

Solutions:
l = list(map(int, input().split()))

print(max(l) - min(l))

X = sorted(list(map(int, input().split())))
print(X[-1] - X[0])

a, b, c = map(int, input().split())
print(max(a, b, c) - min(a, b, c))

a, b, c = sorted(map(int, input().split()))
print(c - a)


a, b, c = sorted(list(map(int, input().split())))
print(b - a + c - b)


def main():
    x = list(map(int, input().split()))
    x.sort()
    print(x[-1] - x[0])

main()


import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time

sys.setrecursionlimit(10**7)
inf = 10**10
mod = 10**9 + 7

def f():
    a = list(map(int, input().split()))
    a.sort()

    return a[1] - a[0] + a[2] - a[1]

print(f())


a = sorted(list(map(int, input().split())))
print(a[2] - a[1] + a[1] - a[0])

a = list(map(int, input().split()))
a.sort()
print(a[2] - a[0])


a,b,c= map(int,input().split())
sr = (a+b+c - (min(a,b,c)+max(a,b,c)))
print(max(a,b,c) - sr + (sr - min(a,b,c)))

arr = [int(x) for x in input().split()]
arr.sort()
print(arr[2]-arr[0])


a,b,c=sorted(list(map(int,input().split())))
print(c-a)


a,b,c = list(map(int, input().split()))
ans = 305
for i in range(1,101):
	ans = min(ans, abs(i-a)+ abs(i-b)+abs(i-c))
print(ans)


a, b, c = [int(x) for x in input().split()]

print(min(abs(a - b) + abs(a - c), abs(a - c) + abs(b - c), abs(a - b) + abs(c - b)))


a = [int(x) for x in input().split()]
print(max(a) - min(a))


a,b,c = list(map(int,input().split()))
mi = min(a,b,c)
ma = max(a,b,c)
sr = a+b+c-mi-ma
print((ma-sr)+(sr-mi))


a, b, c = list(map(int, input().split()))
print(max(a,b,c) - min(a,b,c))


[a,b,c]=sorted(map(int,input().split()))
print(c-a)

def main():
	a = list(map(int, input().split()))
	a.sort()
	ans = abs(a[0] - a[1]) + abs(a[1] - a[2])
	print(ans)

def __starting_point():
	main()
__starting_point()

from sys import stdin as fin
# fin = open("cfr375a.in")

# n = int(fin.readline())
a, b, c = sorted(map(int, fin.readline().split()))
# line = tuple(fin.readline().strip())
print(c - a)

a, b, c = [int(x) for x in input().split(' ')]

d = [a,b,c]
d.sort()

dist = 0
mindis = d[2] + 1

for i in range(d[0], d[2] + 1):
    dist = abs(i - d[0]) + abs(i - d[1]) + abs(i - d[2])
    if dist < mindis: mindis = dist

print(mindis)

arr = list(map(int, input().split()))

arr.sort()

print((arr[1] - arr[0]) + (arr[2] - arr[1]))


x1, x2, x3 = sorted(map(int, input().split()))


print(x2 - x1 + x3 - x2)



import sys, math
f = list(map(int, input().split()))
f.sort()
print(f[1] - f[0] + f[2] - f[1])

A = list(map(int,input().split()))
A.sort()
a = abs(A[0] - A[1])
b = abs(A[1] - A[2])

print(a+b)