Problem:
 Score : 100 points    Problem Statement You have three tasks, all of which need to be completed.  First, you can complete any one task at cost 0 .  Then, just after completing the i -th task, you can complete the j -th task at cost |A_j - A_i| .  Here, |x| denotes the absolute value of x .  Find the minimum total cost required to complete all the task.      Constraints  All values in input are integers.  1 \leq A_1, A_2, A_3 \leq 100         Input Input is given from Standard Input in the following format:  A_1  A_2  A_3       Output Print the minimum total cost required to complete all the task.        Sample Input 1 1 6 3      Sample Output 1 5  When the tasks are completed in the following order, the total cost will be 5 , which is the minimum:   Complete the first task at cost 0 .  Complete the third task at cost 2 .  Complete the second task at cost 3 .        Sample Input 2 11 5 5      Sample Output 2 6       Sample Input 3 100 100 100      Sample Output 3 0

Solution (Python):
a, b, c = map(int, input().split())

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

Solution (Python):
list_num = [int(num) for num in input().split()]
list_num.sort(reverse=True)

print(abs(list_num[1]-list_num[0])+abs(list_num[2]-list_num[1]))

Solution (Python):
import sys, os

f = lambda:list(map(int,input().split()))
if 'local' in os.environ :
    sys.stdin = open('./input.txt', 'r')

def solve():
    a = f()
    x,y,z =abs(a[0]-a[1]), abs(a[0]-a[2]), abs(a[1]-a[2])
    print( x+y+z - max(x,y,z))

solve()

Solution (Python):
task = list(map(int,input().split(" ")))
task.sort(reverse=True)
print(abs(task[1]-task[0])+abs(task[2]-task[1]))

Solution (Python):
A=list(map(int,input().split()))
print(max(A)-min(A))

Solution (Python):
A = [int(t) for t in input().split()]

print(max(A) - min(A))

Solution (Python):
from sys import stdin
a = [int(x) for x in sorted(stdin.readline().rstrip().split())]
print(abs(a[0] - a[1]) + abs(a[1] - a[2]))

Solution (Python):
*a,=map(int,input().split())
print(max(a)-min(a))

Solution (Python):
A = list(map(int, input().split()))
A.sort()
b = int(A[1] - A[0])
c = int(A[2] - A[1])
print(int(b + c))

Solution (Python):
*a,=map(int,input().split())
print(max(a)-min(a))

Solution (Python):
x = list(map(int , input().split()))

print(max(x) - min(x))

Solution (Python):
inp = list(sorted([int(x) for x in input().split()]))
print(inp[2]-inp[0])

Solution (Python):
x = sorted([int(i) for i in input().split()])
score = 0
for i in range(len(x)):
    if i == 0:
        a = x.pop()
    else:
        b = x.pop()
        score += a - b
        a = b
print(score)

Solution (Python):
cost =list(map(int, input().split()))
print(max(cost)- min(cost))

Solution (Python):
from sys import stdin

A = [int(x) for x in stdin.readline().rstrip().split()]

A.sort()

print(A[2] - A[0])

Solution (Python):
l = [int(i) for i in input().split()]
print(max(l) - min(l))

Solution (Python):
a=list(map(int,input().split()))
a.sort()
print((a[2]-a[1])+(a[1]-a[0]))

Solution (Python):
a = [int(x) for x in input().split()]
b = []
b.append(abs(a[0] - a[1]))
b.append(abs(a[1] - a[2]))
b.append(abs(a[0] - a[2]))
b.pop(b.index(max(b)))
print(sum(b))

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

Solution (Python):
x = list(map(int, input().split()))

print(max(x)-min(x))

Solution (Python):
x, y, z = map(int, input().split())

a = abs(y-x) + abs(z-y)
b = abs(z-x) + abs(y-z)
c = abs(x-y) + abs(z-x)
d = abs(z-y) + abs(x-z)
e = abs(x-z) + abs(y-x)
f = abs(y-z) + abs(x-y)

print(min(a,b,c,d,e,f))

Solution (Python):

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

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

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

Solution (Python):

import sys


def solve(A: "List[int]"):
    ret = max(A) - min(A)
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = [ int(next(tokens)) for _ in range(3) ]  
    solve(A)

if __name__ == '__main__':
    main()

Solution (Python):
a, b, c = sorted(map(int, input().split()))

print(c - a)

Solution (Python):
a = [int(i) for i in input().split()]
print(max(a) - min(a))

Solution (Python):
x = list(map(int,input().split()))
x = sorted(x)
print(x[2]-x[0])

Solution (Python):


from sys import stdout
from bisect import bisect_left as binl
from copy import copy, deepcopy
from collections import defaultdict


mod = 1


def intin():
    input_tuple = input().split()
    if len(input_tuple) <= 1:
        return int(input_tuple[0])
    return tuple(map(int, input_tuple))


def intina():
    return [int(i) for i in input().split()]


def intinl(count):
    return [intin() for _ in range(count)]


def modadd(x, y):
    global mod
    return (x + y) % mod


def modmlt(x, y):
    global mod
    return (x * y) % mod


def lcm(x, y):
    while y != 0:
        z = x % y
        x = y
        y = z
    return x


def combination(x, y):
    assert(x >= y)

    if y > x // 2:
        y = x - y

    ret = 1

    for i in range(0, y):
        j = x - i
        i = i + 1

        ret = ret * j
        ret = ret // i

    return ret


def get_divisors(x):
    retlist = []
    for i in range(1, int(x**0.5) + 3):
        if x % i == 0:
            retlist.append(i)
            retlist.append(x // i)
    return retlist


def get_factors(x):
    retlist = []
    for i in range(2, int(x**0.5) + 3):
        while x % i == 0:
            retlist.append(i)
            x = x // i
    retlist.append(x)
    return retlist


def make_linklist(xylist):
    linklist = {}
    for a, b in xylist:
        linklist.setdefault(a, [])
        linklist.setdefault(b, [])
        linklist[a].append(b)
        linklist[b].append(a)
    return linklist


def calc_longest_distance(linklist, v=1):
    distance_list = {}
    distance_count = 0
    distance = 0
    vlist_previous = []
    vlist = [v]
    nodecount = len(linklist)

    while distance_count < nodecount:
        vlist_next = []
        for v in vlist:
            distance_list[v] = distance
            distance_count += 1
            vlist_next.extend(linklist[v])
        distance += 1
        vlist_to_del = vlist_previous
        vlist_previous = vlist
        vlist = list(set(vlist_next) - set(vlist_to_del))

    max_distance = -1
    max_v = None
    for v, distance in distance_list.items():
        if distance > max_distance:
            max_distance = distance
            max_v = v

    return (max_distance, max_v)


def calc_tree_diameter(linklist, v=1):
    _, u = calc_longest_distance(linklist, v)
    distance, _ = calc_longest_distance(linklist, u)
    return distance





def main():
    a1, a2, a3 = intin()

    a12 = abs(a1 - a2)
    a23 = abs(a2 - a3)
    a31 = abs(a3 - a1)

    mina = min(a12 + a23, a23 + a31)
    mina = min(mina, a31 + a12)
    print(mina)


if __name__ == '__main__':
    main()

Solution (Python):
a,b,c = map(int, input().split())
res = min(( abs(b - a) + abs(c - b), abs(c-b)  + abs(a - c) , abs(a-c) + abs(b- a)))
print(res)

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

Solution (Python):
a = list(map(int,input().split()))
print(max(a)-min(a))

Solution (Python):
A = [int(i) for i in input().split()]
A.sort()
print(A[2]-A[0])

Solution (Python):
lst = list(map(int,input().split()))
lst.sort(reverse=True)
print((lst[0] - lst[1]) + (lst[1] - lst[2]))

Solution (Python):
a,b,c=map(int,input().split())
l=sorted([a,b,c])
print(l[-1]-l[0])

Solution (Python):
from itertools import permutations
def cost(aa):
    return abs(aa[1]-aa[0]) + abs(aa[2]-aa[1])
aa=map(int,input().split())
print(min(map(cost,permutations(aa))))

Solution (Python):
import sys


def input():
    return sys.stdin.readline()[:-1]








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

Solution (Python):
a = list(map(int, input().split()))
print(max(a)-min(a))

Solution (Python):
A=[int(i) for i in input().split()]
B=[0]*3
B[0]=abs(A[1]-A[0])+abs(A[2]-A[0])
B[1]=abs(A[2]-A[1])+abs(A[0]-A[1])
B[2]=abs(A[0]-A[2])+abs(A[1]-A[2])
print(min(B))

Solution (Python):
A = list(map(int, input().split()))

A.sort(reverse=True)

print(abs(A[1] - A[0]) + abs(A[2] - A[1]))

Solution (Python):
A = list(map(int, input().split()))

print(max(A)-min(A))

Solution (Python):
A = list(map(int,input().split()))
a, b, c = abs(A[0]-A[1]), abs(A[1]-A[2]), abs(A[2]-A[0])
print(min(a+b, b+c, c+a))

Solution (Python):
a=list(map(int,input().split()))
print(max(a)-min(a))

Solution (Python):
li = list(map(int,input().split()))
li.sort()

for i in range (len(li) - 1, 0, -1):
  li[i] -= li[i - 1]

li[0] = 0
ans = 0

for i in li:
  ans += i

print(ans)

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

Solution (Python):

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



if __name__ == '__main__':
    main()

Solution (Python):
import sys
a = list(map(int, sys.stdin.readline().split()))
diff = sorted([abs(a[i] - a[i+1]) for i in range(-1,len(a)-1)])
print(diff[0] + diff[1])

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

Solution (Python):
arr = list(map(int, input().split()))
arr = sorted(arr)
cost = 0
for i in range(len(arr)-1):
  cost += (arr[i+1] - arr[i])
print(cost)

Solution (Python):
l = list(map(int,input().split()))
l.sort()
print(l[2]-l[0])

Solution (Python):
a, b, c = map(int,input().split())
d = abs(a-b)
e = abs(b-c)
f = abs(a-c)
list = [d,e,f]
list1 = sorted(list)
print(list1[0]+list1[1])

Solution (Python):
A = list(map(int,input().split()))
print(max(A) - min(A))

Solution (Python):
a,b,c = map(int,input().split())

a_b = abs(a - b)
b_c = abs(b - c)
a_c = abs(a - c)

print(( a_b + b_c + a_c) - max(a_b,b_c,a_c))

Solution (Python):
n = sorted(map(int, input().split()))
print(n[2]-n[0])

Solution (Python):
A = list(map(int, input().split()))
ans = 200
for i in range(3):
  for j in range(3):
    if j == i:
      continue
    for k in range(3):
      if k == i or k == j:
        continue
      ans = min(ans, abs(A[k] - A[j]) + abs(A[j] - A[i]))
print(ans)

Solution (Python):
A = sorted(map(int, input().split()))
print(A[2] - A[0])

Solution (Python):
a_1, a_2, a_3 = map(int, input().split())

maxs = max(a_1, a_2, a_3)
mins = min(a_1, a_2, a_3)
ans = maxs-mins
print(ans)

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

Solution (Python):
a = [int(i) for i in input().split()]
a.sort()
print(a[2]-a[0])

Solution (Python):
a,b,c=map(int,input().split())

M=max(a,b,c)
m=min(a,b,c)

print(M-m)

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

Solution (Python):
lst=list(map(int,input().split()))
lst.sort()
print(abs(lst[0]-lst[1])+abs(lst[1]-lst[2]))

Solution (Python):
lista = [int(i) for i in input().split()]
lista.sort()
print(abs(lista[0]-lista[1])+abs(lista[2]-lista[1]))

Solution (Python):
A = list(map(int ,input().split()))
A.sort()
print(abs(A[0]-A[1]) + abs(A[1]-A[2]))

Solution (Python):
A=input().split()
A=[int(i) for i in A]
A.sort()
print(abs(A[1]-A[0])+abs(A[2]-A[1]))

Solution (Python):
Task = list(map(int,input().split()))
Task.sort(reverse = True)
print(Task[0] - Task[2])

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

Solution (Python):
a = list(map(int, input().split()))
a.sort()
print(a[-1] - a[0])

Solution (Python):
a = list(int(i) for i in input().split())  
a = sorted(a)

print(abs(a[0] - a[1]) + abs(a[1] - a[2]))

Solution (Python):
ALst = list(map(int, input().split()))

tLst = []
for i in range(3):
    for j in range(i, 2):
        tLst.append(int(abs(ALst[i] - ALst[j + 1])))

tLst.sort()
ans = tLst[0] + tLst[1]
print(ans)

Solution (Python):

import sys
from math import *
from itertools import *
from collections import *
from functools import *
try:
    from math import gcd
except Exception:
    from fractions import gcd


def solve(A: "List[int]"):
    A.sort()
    return A[-1] - A[0]


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = [ int(next(tokens)) for _ in range(3) ]  
    result = solve(A)
    print(result)

if __name__ == '__main__':
    main()

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

Solution (Python):
n = list(map(int, input().split()))
n.sort()
sa = 0
for i in range(1, len(n)):
    sa += n[i] - n[i-1]
print(sa)

Solution (Python):
a = sorted(map(int,input().split()))
ans = 0
for i in range(len(a)-1):
    ans += a[i+1] - a[i]
print(ans)

Solution (Python):
A = list(map(int,input().split()))

A.sort()

ans = 0
for i in range(3):
    if i==0:
        continue
    ans += abs(A[i]-A[i-1])

print(ans)

Solution (Python):
import sys
input = sys.stdin.readline

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

a.sort()

ans = 0
ans += a[1]-a[0]
ans += a[2]-a[1]
print(ans)

Solution (Python):
a,b,c=list(map(int,input().split()))
g=max(a,b,c)
h=min(a,b,c)
print(abs(g-h))

Solution (Python):
a,b,c = map(int,input().split())
n = abs(a-b)
m = abs(b-c)
l = abs(c-a)
x = max([n,m,l])
print(n+m+l-x)

Solution (Python):
A1, A2, A3 = map(int, input().split())
a1 = abs(A1 - A2)
a2 = abs(A1 - A3)
a3 = abs(A2 - A3)

alist = [a1, a2, a3]

min1 = min(alist)
index = alist.index(min1)
alist.pop(index)


min2 = min(alist)
print(min1 + min2)

Solution (Python):
c = list(map(int, input().split()))
c = sorted(c, reverse=False)
ans = 0
ans = ans + abs(c[0] - c[1])
ans = ans + abs(c[1] - c[2])
print(ans)

Solution (Python):
A = list(map(int,input().split()))
print(max(A)-min(A))

Solution (Python):
alist=input().split()
alist_int=[int(i) for i in alist]
alist_int.sort()
min=int(alist_int[0])
max=int(alist_int[2])
ans=max-min
print(ans)

Solution (Python):
A = [int(x) for x in input().split()]

print(max(A) - min(A))

Solution (Python):
A = list(map(int,input().split()))
A.sort()
print(abs(A[2]-A[1])+abs(A[1]-A[0]))

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

Solution (Python):
c = list(map(int, input().split()))
c.sort()

ans =0
for i in range(len(c)-1):
    ans += c[i+1] - c[i]
print(ans)

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

Solution (Python):
A1, A2, A3 = map(int, input().split())

temp1 = abs(A1 - A2) + abs(A2 - A3)
temp2 = abs(A2 - A3) + abs(A3 - A1)
temp3 = abs(A3 - A1) + abs(A1 - A2)

print(min(temp1, temp2, temp3))

Solution (Python):
A = sorted(map(int,input().split()))
ans = 0
for i in range(2): ans += A[i+1] - A[i]
print(ans)

Solution (Python):
a,b,c=sorted( map(int,input().split()) )
print(0 + b-a + c-b)

Solution (Python):
a=list(map(int,input().split()))
print(max(a)-min(a))

Solution (Python):
import itertools
A = list(map(int, input().split()))
m = float('inf')
for v in list(itertools.permutations(A)):
  tmp = abs(v[1] - v[0]) + abs(v[2] - v[1])
  if tmp < m:
    m = tmp
print(m)

Solution (Python):
A = list(map(int, input().split()))
A.sort()
print(A[2] - A[0])

Solution (Python):
import functools

import os

INF = float('inf')


def inp():
    return int(input())


def inpf():
    return float(input())


def inps():
    return input()


def inl():
    return list(map(int, input().split()))


def inlf():
    return list(map(float, input().split()))


def inls():
    return input().split()


def debug(fn):
    if not os.getenv('LOCAL'):
        return fn

    @functools.wraps(fn)
    def wrapper(*args, **kwargs):
        print('DEBUG: {}({}) -> '.format(
            fn.__name__,
            ', '.join(
                list(map(str, args)) +
                ['{}={}'.format(k, str(v)) for k, v in kwargs.items()]
            )
        ), end='')
        ret = fn(*args, **kwargs)
        print(ret)
        return ret

    return wrapper


a = inl()
print(max(a)-min(a))

Solution (Python):
A = list(map(int,input().split()))
s = sum(A)
ans = 1000
for i in range(3):
    for j in range(3):
        if i == j:
            continue
        b = abs(A[i]-A[j])+abs(A[j]-(s-(A[i]+A[j])))
        ans = min(ans,b)
print(ans)

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

Solution (Python):
A = list(map(int,input().split()))
cnt = 0
cost = 0
sum_A = sum(A)
min = 9999
for i in range(len(A)):
    cost = 0
    for j in range(len(A)):
            if i != j:
                cost = abs(A[j] - A[i] ) + abs(A[j] - (sum_A - A[i] - A[j]))
                if min > cost:
                    min = cost
cost = 0
print(min)

Solution (Python):
a1,a2,a3=map(int, input().split())

print(max(a1,a2,a3)-min(a1,a2,a3))

Solution (Python):

data = sorted(list(map(int, input().rstrip().split())))
print(data[2] - data[0])

Solution (Python):
A = [int(i) for i in input().split()]
A.sort(reverse=True)
print(A[0]-A[2])

Solution (Python):
from itertools import permutations
A1, A2, A3 = (int(i) for i in input().split())

res=1000
for (a, b, c) in permutations([A1,A2,A3], 3):
    intermediate = abs(a-b)+abs(b-c)
    if(intermediate< res):
        res=intermediate

print(res)

Solution (Python):
list = list(map(int,input().split()))
print(max(list)-min(list))

Solution (Python):
list = list(map(int,input().split()))
print(max(list)-min(list))

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

Solution (Python):
A = map(int, input().split(' '))
A = sorted(A)

result = 0
for i in range(len(A)-1):
  result += A[i+1] - A[i]
print(result)

Solution (Python):
a = list(map(int, input().split()))
print(max(a)-min(a))

Solution (Python):
a = list(map(int, input().split()))
ret123 = abs(a[1]-a[0]) + abs(a[2] - a[1])
ret132 = abs(a[2]-a[0]) + abs(a[1] - a[2])
ret213 = abs(a[0]-a[1]) + abs(a[2] - a[0])
ret231 = abs(a[2]-a[1]) + abs(a[0] - a[2])
ret312 = abs(a[0]-a[2]) + abs(a[1] - a[0])
ret321 = abs(a[1]-a[2]) + abs(a[0] - a[1])
print(min([ret123, ret132, ret213, ret231, ret321, ret312]))

Solution (Python):
a = [int(n) for n in input().split()]

a.sort()
print(a[-1]-a[0])

Solution (Python):
L = list(map(int,input().split()))
L = sorted(L, reverse=True)
print(L[0]-L[2])

Solution (Python):
a,b,c=map(int,input().split())
x =abs(a-b)
y =abs(b-c)
z =abs(c-a)
print(min(x+y,y+z,z+x))

Solution (Python):


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

N.sort()


print(N[2] - N[0])

Solution (Python):
a1,a2,a3 = map(int, input().split())
print(max(a1,a2,a3)-min(a1,a2,a3))

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

Solution (Python):
a = sorted(map(int,input().split()))

print(abs(a[0] - a[1]) + abs(a[1] - a[2]))

Solution (Python):
def main():
	A = list(map(int, input().split()))
	A.sort()
	print(A[2]-A[0])


if __name__ == '__main__':
    main()

Solution (Python):
n = list(map(int,input().split()))
n.sort()
print(n[2]-n[0])

Solution (Python):
a = list(map(int, input().split()))

a.sort()

print(a[2]-a[0])

Solution (Python):
l = [int(x) for x in input().split()]
l.sort()
print(l[2]-l[1]+l[1]-l[0])

Solution (Python):
A = list(map(int,input().split()))
print(max(A) - min(A))

Solution (Python):
A = list(map(int,input().split()))

A.sort()

cost = A[2]-A[0]
print(cost)

Solution (Python):
A1,A2,A3 = map(int,input().split())
print(max(A1,A2,A3)-min(A1,A2,A3))

Solution (Python):

A =[int(j) for j in input().split()]
A.sort()
print(abs(A[2]-A[0]))

Solution (Python):
a=sorted(map(int,input().split()))
print(a[2]-a[0])

Solution (Python):
A = [int(i) for i in input().split()]
A.sort()
res = 0
for i in range(1, len(A)):
    res += A[i] - A[i-1]
print(res)

Solution (Python):
A = list(map(int, input().split()))

A.sort()
ans = 0
for i in range(1, len(A)):
    ans += abs(A[i] - A[i-1])

print(ans)

Solution (Python):
a,b,c=map(int,input().split())
s=abs(a-b)+abs(b-c)+abs(c-a)
m=max(abs(a-b),abs(b-c),abs(c-a))
print(s-m)

Solution (Python):
a = list(map(int,input().split()))
a.sort()
ans = 0
for i in range(1,3):
    ans += a[i]-a[i-1]
print(ans)

Solution (Python):
a, b, c = map(int, input().split())
A = [a, b, c]
A.sort()
ans = 0
for i in range(len(A) - 1):
    ans += A[i + 1] - A[i]
print(ans)

Solution (Python):
List=[int(i) for i in input().split()]
print(max(List)-min(List))

Solution (Python):
A = list(map(int, input().split()))
print(max(A) - min(A))

Solution (Python):
task = list(map(int, input().split()))
task = sorted(task)
cost = 0
for i in range(2):
  cost += task[i+1] - task[i]
print(cost)

Solution (Python):
a,b,c = map(int,input().split())

list = sorted([abs(a-b), abs(b-c), abs(c-a)],reverse=True)

print(list[1]+list[2])

Solution (Python):
A1, A2, A3 = map(int, input().split())
print(min(abs(A1 - A2) + abs(A2 - A3), abs(A1 - A2) + abs(A1 - A3), abs(A2 - A3) + abs(A3 - A1)))

Solution (Python):
A = [int(i) for i in input().split()]

A.sort()

print(A[-1]-A[0])

Solution (Python):
A = list(map(int, input().split()))
print(max(A) - min(A))

Solution (Python):
list = [int(i) for i in input().split()]
print(max(list) - min(list))

Solution (Python):
A = sorted(list(map(int, input().split())), reverse=True)
print(abs((A[1]-A[0])) + abs((A[2]-A[1])))

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

Solution (Python):
n = [int(_) for _ in input().split()]
n.sort()
print(n[2]-n[0])

Solution (Python):


def main():
    A = [int(x) for x in input().split()]
    print(max(A)-min(A))

if __name__ == '__main__':
    main()

Solution (Python):
*A, = sorted(map(int, input().split()))
print(A[2]-A[0])

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

Solution (Python):
A = [int(i) for i in input().split()]
A.sort()
print(A[2] - A[0])

Solution (Python):
A_list = list(map(int, input().split()))
A_list.sort()
print(A_list[2]-A_list[0])

Solution (Python):
l=list(map(int, input().split()))
l.sort()
print(abs(l[1]-l[0])+abs(l[2]-l[1]))

Solution (Python):
A, B, C = map(int, input().split())

X = [abs(A - B), abs(B - C), abs(C - A)]

print(sum(X) - max(X))

Solution (Python):


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

N.sort()


print(N[2] - N[0])

Solution (Python):
A,B,C = map(int,input().split())
D = abs(A - B)
E = abs(A - C)
F = abs(B - C)
if D >= E and D >= F:
    print(D)
elif E >= D and E >= F:
    print(E)
else:
    print(F)

Solution (Python):
task=list(map(int,input().split()))
print(sorted(task)[2]-sorted(task)[0])

Solution (Python):

import sys
import itertools
import collections
import functools
import math
from queue import Queue
INF = float("inf")


def solve(A: "List[int]"):
    A.sort()
    print(A[2]-A[0])
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = [int(next(tokens)) for _ in range(3)]  
    solve(A)


if __name__ == '__main__':
    main()

Solution (Python):
List=list(map(int,input().split()))
print(sorted(List)[2]-sorted(List)[0])

Solution (Python):
*l, = map(int, input().split())
print(max(l)-min(l))

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

Solution (Python):
a = sorted(list(map(int,input().split())))
print(a[2]-a[0])

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

Solution (Python):
a1, a2, a3 = map(int, input().split())
a = sorted([a1,a2,a3])
print(a[2] - a[0])

Solution (Python):
a,b,c = map(int, input().split())

t=0
if a > b :
    t=a
    a=b
    b=t
if b > c :
    t=b
    b=c
    c=t
if a > b :
    t=a
    a=b
    b=t

print(c-a)

Solution (Python):
a1, a2, a3 = map(int, input().split())

task = [a1, a2, a3]
task = sorted(task)

ans = abs(task[0] - task[1]) + abs(task[1] - task[2])
print(ans)

Solution (Python):
x = list(map(int, input().split()))

x.sort()

print(x[2] - x[0])

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

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

Solution (Python):
a1,a2,a3 = map(int,input().split())

c1 = abs(a1-a2)
c2 = abs(a2-a3)
c3 = abs(a1-a3)

C = [c1,c2,c3]
D = sorted(C)
ans = D[1]+D[0]

print(ans)

Solution (Python):
a = list(map(int, input().split()))
a.sort()
print(a[-1] - a[0])

Solution (Python):
A = sorted(list(map(int,(input().split()))))
print(A[-1]-A[0])

Solution (Python):
a, b, c = map(int, raw_input().split())
d = a
z = a
if d < b:
    d = b
if d < c:
    d = c
if z > b:
    z = b
if z > c:
    z = c
print d - z

Solution (Python):
l=sorted(list(map(int,input().split())))
print(l[2]-l[0])

Solution (Python):
a = list(map(int,input().split()))
a = sorted(a)[::-1]
ans = 0
for i in range(1,3):
    ans += abs(a[i]-a[i-1])
print(ans)

Solution (Python):
N=sorted(map(int,input().split()));c=0
for n in range(1,len(N)):
    c+=N[n]-N[n-1]
print(c)

Solution (Python):
a=list(map(int,input().split()))
a.sort()
b=[a[2]-a[1],a[2]-a[0],a[1]-a[0]]
b.sort()
print(b[0]+b[1])

Solution (Python):
a_list = sorted(list(map(int,input().split())))
print(a_list[2]-a_list[1]+a_list[1]-a_list[0])

Solution (Python):
*a,=map(int,input().split());print(max(a)-min(a))

Solution (Python):
A_1, A_2, A_3 = map(int, input().split())
alist = [A_1, A_2, A_3]
print(max(alist) - min(alist))

Solution (Python):
A = list(map(int,input().split()))
A.sort()
print(abs(A[1]-A[0])+abs(A[2]-A[1]))

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

Solution (Python):
l=list(map(int,input().split()))
print(max(l)-min(l))

Solution (Python):
def cal(a,b,c):
    return abs(b-a)+abs(c-b)

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


print( min( cal(a,b,c),cal(a,c,b),cal(b,a,c),cal(b,c,a),cal(c,a,b),cal(c,b,a) ) )

Solution (Python):
a=sorted(list(map(int,input().split())))
print(a[2]-a[0])

Solution (Python):
a = sorted(list(map(int, input().split())))

print(a[2] - a[0])

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

Solution (Python):
a=list(map(int,input().split()))
print(max(a)-min(a))

Solution (Python):
a = [ int(i) for i in input().split() ]
a = sorted(a)
print( a[1] - a[0] + a[2] - a[1] )

Solution (Python):
l=list(map(int,input().split()))
print(max(l)-min(l))

Solution (Python):
a,b,c=map(int,input().split())
l=[a,b,c]
print(max(l)-min(l))

Solution (Python):
a1,a2,a3=map(int,input().split())
l=[a1-a2,a1-a3,a2-a3]
l=list(map(abs,l))
l.sort()
print(l[0]+l[1])

Solution (Python):
a1,a2,a3 = map(int,input().split())
li = [a1,a2,a3]
li.remove(min(li))
li2 = [a1,a2,a3]
print(sum(li)-min(li2)-min(li))

Solution (Python):


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

a.sort()

print(a[2]- a[0])

Solution (Python):
A=map(int,input().split())
A=list(A)
print(max(A)-min(A))

Solution (Python):
A=map(int,input().split())
A=list(A)
A.sort()
print(A[2]-A[0])

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

Solution (Python):

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

Solution (Python):
n = [int(i) for i in input().split()]
n.sort()
print(int(n[2]-n[0]))

Solution (Python):
n = list(map(int, input().split()))
n.sort()
print(n[2]-n[0])

Solution (Python):
list_a = list(map(int,input().split()))
list_a.sort()

ans = 0
ans += abs(list_a[0]-list_a[1])
ans += abs(list_a[1]-list_a[2])

print(ans)

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

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

Solution (Python):
A = sorted( map(int, input().split()) )
print( abs(A[0] - A[1]) + abs(A[1] - A[2]) )

Solution (Python):
a=list(map(int,input().split()))
print(abs(max(a)-min(a)))

Solution (Python):
a = [int(item) for item in input().split()]
a = sorted(a)

print(a[2] - a[0])

Solution (Python):
li = [int(x) for x in input().split()]
cost = 10**9
for i in range(3):
  for j in range(3):
    for k in range(3):
      if(i==j or j==k or i==k):continue
      cost = min(cost,abs(li[i]-li[j])+abs(li[j]-li[k]))
print(cost)

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

Solution (Python):
N=list(map(int,input().split()))
print(max(N)-min(N))

Solution (Python):
L = list(map(int,input().split()))
cost = 0
max_L = max(L)
L.remove(max_L)
second_L = max(L)
cost = max_L - second_L
L.remove(max(L))
cost += second_L - L[0]
print(cost)

Solution (Python):
n = list(map(int, input().split()))
print(max(n) - min(n))

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

Solution (Python):
l=list(map(int,input().split()))
l.sort()
print(l[2]-l[0])

Solution (Python):
A=[int(i) for i in input().split()]
A.sort()
print((A[2]-A[1])+(A[1]-A[0]))

Solution (Python):
a = [int(i) for i in input().split()]
a = sorted(a)
diff_list = [a[i+1] - a[i] for i in range(len(a)-1)]
ans = sum(diff_list)
print(ans)

Solution (Python):
l = sorted([int(i) for i in input().split()])
print(l[2]-l[0])

Solution (Python):
a, b, c = map(int, input().split())
ans = abs(a-b) + abs(b-c) + abs(a-c) - max(abs(a-b), abs(b-c), abs(c-a))
print(ans)

Solution (Python):
a = list(map(int, input().split()))
a.sort()
b = 0

for i in range(len(a)-1):
    b += a[i+1]-a[i]

print(b)

Solution (Python):
a=list(map(int,input().split()))
print(max(a)-min(a))

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

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

Solution (Python):
a=list(map(int,input().split()));print(max(a)-min(a))

Solution (Python):
x = list(map(int , input().split()))
x = sorted(x)

print(x[2]-x[0])

Solution (Python):
A = list(map(int, input().split()))
A = sorted(A)
print(A[1]-A[0]+A[2]-A[1])

Solution (Python):
a, b, c = map(int, input().split())

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

Solution (Python):
l=list(map(int,input().split()))
print(max(l)-min(l))

Solution (Python):
*a, = map(int, input().split())
print(max(a) - min(a))

Solution (Python):
A = list(map(int, input().split()))
print(max(A) - min(A))

Solution (Python):
a = list(map(int, input().split()))
a.sort()
print((a[1]-a[0])+(a[2]-a[1]))

Solution (Python):
A = list(map(int, input().split()))
A = sorted(A)
print(A[2]-A[0])

Solution (Python):
a=list(map(int,input().split()))
s=sorted(a)[::-1]
r=0
c=0
for e in s:
  if r!=0: c+=abs(r-e)
  r=e
print(c)

Solution (Python):
a=list(map(int,input().split()))
ans=[10**8]*6
ans[0]=abs(a[1]-a[0])+abs(a[2]-a[1])
ans[1]=abs(a[2]-a[0])+abs(a[1]-a[2])
ans[2]=abs(a[0]-a[1])+abs(a[2]-a[0])
ans[3]=abs(a[2]-a[1])+abs(a[0]-a[2])
ans[4]=abs(a[0]-a[2])+abs(a[1]-a[0])
ans[5]=abs(a[1]-a[2])+abs(a[0]-a[1])
print(min(ans))

Solution (Python):
Ai = list(map(int, input().split()))
Ai.sort()
print(Ai[2] - Ai[0])

Solution (Python):
li = list(map(int,input().split()))
li = sorted(li)
answer = -li[0]+li[2]
print(answer)

Solution (Python):
A = [int(i) for i in input().split()]
print(max(A)-min(A))

Solution (Python):
nums = list(map(int, input().split(' ')))
nums.sort()
buf = nums[0]
nums = list(map(lambda x: x - buf, nums))
print(nums[2])

Solution (Python):
import numpy as np
from sys import stdin
data=[int(x) for x in stdin.readline().rstrip().split()]
data=np.array(data)
data=sorted(data)
print(np.sum(np.diff(data)))

Solution (Python):
A = list(map(int, input().split()))

A.sort(reverse=True)
for i in range(3):
    if i == 0:
        sum=0
    else:
        sum = sum+abs(A[i] - A[i-1])
print(sum)

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

Solution (Python):
A=list(map(int,input().split()))
print(max(A)-min(A))

Solution (Python):
A=sorted(list(map(int,input().split())))
print(A[2]-A[0])

Solution (Python):
a = [int(i) for i in input().split()]
print(max(a)-min(a))

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