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=sorted(list(map(int,input().split())))
print(A[2]-A[1]+A[1]-A[0])

Solution (Python):
items=list(map(int, input().split()))
m=sum(items)-(max(items)+min(items))
print(abs(max(items)-m)+ abs(min(items)-m))

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

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

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

Solution (Python):
import itertools

*A,  = map(int, input().split())

L = itertools.permutations(A)

min = float('inf')

for l in L:
    temp = abs(l[1]-l[0])+abs(l[2]-l[1])
    if min > temp:
        min = temp
print(min)

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

s=sorted(a)

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

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

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

print(max(a)-min(a))

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

lst1 = [a,b,c]
lst1.sort(reverse=True)

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline
import numpy as np
A = [int(x) for x in input().split()]
A1 = np.array(sorted(A))
A2 = np.array(sorted(A, reverse=True))
A1 = abs(np.diff(A1)).sum()
A2 = abs(np.diff(A2)).sum()
print(min(A1, A2))

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

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

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

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a=LIST()
    print(max(a)-min(a))
if __name__ == '__main__':
    do()

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

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

A.sort()

cost = 0
sum = 0
for i in range(1,len(A)):
    cost = A[i] - A[i-1]
    sum += cost

print(sum)

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

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

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

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

Solution (Python):
from itertools import permutations


def calc_cost(t1, t2, t3):
    cost = 0
    cost += abs(t2 - t1)
    cost += abs(t3 - t2)
    return cost


def main():
    A = [int(i) for i in input().split()]
    min_cost = 198
    for a, b, c in permutations(A):
        min_cost = min(min_cost, calc_cost(a, b, c))
    print(min_cost)


if __name__ == "__main__":
    main()

Solution (Python):
import sys
input = sys.stdin.readline
li_A = list(map(int, input().split()))
li_abs = [0]*3
for i in range(3):
    li_abs[i] = abs(li_A[i] - li_A[(i+1)%3])
li_abs.sort()
print(li_abs[0]+li_abs[1])

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

Solution (Python):
List=list(map(int,input().split()))
List.sort()
ans=10000
for i in range(3):
    cou=0
    for j in range(3):
         cou+=abs(List[i]-List[j])
    ans=min([ans,cou])
print(ans)

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

Solution (Python):
import math

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

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

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

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

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

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

Solution (Python):
import math

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

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

A = sorted([int(abs(a1-a2)), int(abs(a2-a3)), int(abs(a3-a1))])

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

Solution (Python):
from itertools import permutations
a_list = list(map(int, input().split()))

ans = 1000
for p in permutations(a_list):
    cost = abs(p[1] - p[0]) + abs(p[2] - p[1])
    ans = min(cost, ans)

print(ans)

Solution (Python):
import sys 

l = list(map(int, sys.stdin.readline().split()))

l.sort()
m = l[1:]

sum = 0
for min, max in zip(l, m):
    sum += max - min

print(sum)

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

orders = (
    (a1, a2, a3),
    (a1, a3, a2),
    (a2, a1, a3),
    (a2, a3, a1),
    (a3, a1, a2),
    (a3, a1, a2)
)


def get_cost(i1, i2, i3):
    return abs(i2-i1) + abs(i3-i2)


costs = [get_cost(*order) for order in orders]
print(min(costs))

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

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

Solution (Python):
A,B,C = list(map(int,input().split()))
srt = sorted([A,B,C])

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

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

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

Solution (Python):
a1, a2, a3 = [int(x) for x in input().split()]
a1, a2, a3 = sorted([a1, a2, a3])
print(a3-a1)

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

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

Solution (Python):
A,B,C=map(int, input().split())
a=abs(A-B)
b=abs(A-C)
c=abs(B-C)


saidai=max(a,b,c)
kotae=a+b+c-saidai
print(kotae)

Solution (Python):
import numpy as np
A = np.array(sorted(map(int, input().split())))
print((A[1:] - A[:-1]).sum())

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()))
r = max(a)
a.remove(max(a))
ans = 0
ans += abs(r - max(a)) + abs(a[0] - a[1])
print(ans)

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

Solution (Python):


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

A.sort()

res = 0
for i in range(1, 3):
    res += abs(A[i] - A[i-1])
print(res)

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

a.sort()

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

Solution (Python):
a, b, c = map(int, input().split())
c1 = abs(a-b) + abs(b-c)
c2 = abs(a-c) + abs(c-b)
c3 = abs(b-a) + abs(a-c)
cs = [c1, c2, c3]
print(min(cs))

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

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

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

cost = a_L[1]-a_L[0] + a_L[2]-a_L[1]
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):
a,b,c=map(int,input().split())
x=abs(a-b)
y=abs(a-c)
z=abs(b-c)
print(x+y+z-max(x,y,z))

Solution (Python):
a, b, c = map(int, input().split())
costs = [abs(a-b), abs(c-b), abs(c-a)]
costs.sort()
costs.pop()
print(sum(costs))

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

ans = [abs(a-b),abs(a-c),abs(b-c)]

ans.sort()

print(ans[0]+ans[1])

Solution (Python):
a,b,c=map(int,input().split())
z=[]
z.append(abs(a-b))
z.append(abs(b-c))
z.append(abs(c-a))
z.sort(reverse=True)
print(int(z[1])+int(z[2]))

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

Solution (Python):
import math
import itertools

A = list(map(int, input().split()))
Diff = [abs(A[0]-A[1]),abs(A[1]-A[2]), abs(A[0]-A[2])]
print(sum(Diff)-max(Diff))

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

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

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

Solution (Python):
l = list(map(int, input().split()))
l = sorted(l)
sum = 0
old = l[0]
if len(l) == 1:
    print(0)
else:
    for i in range(1, len(l)):
        sum += l[i] - old
        old = l[i]
    print(sum)

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

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

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

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

A.sort()
print((A[2] - A[1]) + (A[1] - A[0]))

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

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

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):
def examA():
    A = LI()
    ans = max(A)-min(A)
    print(ans)

import sys,copy,bisect,itertools,heapq,math
from heapq import heappop,heappush,heapify
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LSI(): return list(map(str,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def SI(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examA()

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

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

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

ans = 10**5
for i in range(3):
    for j in range(3):
        for k in range(3):
            if i != j and j != k and i != k:
                cost = abs(a[j] - a[i]) + abs(a[k] - a[j])
                if ans > cost:
                    ans = cost
print(ans)

Solution (Python):
A1, A2, A3 = map(int, input().split(" "))
print(sum(sorted([abs(A1 - A2), abs(A1 - A3), abs(A2 - A3)])[:2]))

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

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

x = abs(a-b)
y = abs(b-c)
z = abs(c-a)

print(x + y + z - max(x, y, z))

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

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

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

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

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

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

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

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

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

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

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

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

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

A.sort(reverse=True)

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

Solution (Python):


A=list(map(int,input().split(" ")))
minc=200 

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

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

Solution (Python):

import sys


def solve(A: "List[int]"):
    As = sorted(A, reverse=True)
    ans = 0
    for i in range(len(As) - 1):
            ans += abs(As[i] - As[i + 1])
    print(ans)

def main():
    A = list(map(int, input().split()))
    solve(A)

if __name__ == '__main__':
    main()

Solution (Python):

import math



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


list = []
list.append(A1)
list.append(A2)
list.append(A3)
list.sort()

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

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

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

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

Solution (Python):
import itertools as i

A = [int(a) for a in input().split()]
cost = 1000
for a in i.permutations(A):
    cost = min(cost, abs(a[0] - a[1]) + abs(a[1] - a[2]))
print(cost)

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

A = abs(N[0]-N[1])
B = abs(N[1]-N[2])

print(A+B)

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

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

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

one, two, three = abs(a-b), abs(b-c), abs(c-a)
X = [one, two, three]
X = sorted(X)
ans = X[0] + X[1]
print(ans)

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

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

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

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
from bisect import bisect

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A1, A2, A3 = MAP()

a = sorted([A1, A2, A3])
ans = 0
for i in range(1, 3):
	ans += a[i]-a[i-1]

print(ans)

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

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

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

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

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

print(max(al)-min(al))

Solution (Python):

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

diff = [0]*len(a)

diff = [abs(a[i]-a[i+1]) for i in range(len(a)-1)]+[abs(a[-1]-a[0])]

ret = sum(diff)-max(diff)

print(ret)

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

Solution (Python):
import math

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

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

sum = 0
for i, num in enumerate(A_list):
  if i == 0:
    continue
  cost = num - A_list[i-1]
  sum += cost
print(sum)

Solution (Python):
weight=[ w for w in list(map(int,input().split())) ]
list.sort(weight, reverse=True)

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

Solution (Python):
A, B, C = map(int, input().split())
print(sum(sorted([abs(A-B), abs(B-C), abs(C-A)])[:2]))

Solution (Python):
from sys import stdin

li = list(map(int,stdin.readline().rstrip().split()))

li.sort(reverse=True)

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

print(point)

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

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

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

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

x = abs(A1-A2)
y = abs(A2-A3)
z = abs(A3-A1)

N = [x,y,z]
N.sort()
ans = N[0] + N[1]
print(ans)

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

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

Solution (Python):
l = [0]*3
l[0],l[1],l[2]=map(int,input().split())

l.sort()

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

Solution (Python):

A, B, C = map(int, input().split())
print(max(A,B,C)-min(A,B,C))

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

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

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

ls_cost = [abs(ls[0]-ls[1]), abs(ls[1]-ls[2]), abs(ls[2]-ls[0])]
ls_cost.sort()

print(ls_cost[0] + ls_cost[1])

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

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

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

Solution (Python):




import sys













def main():
    *n, = (int(x) for x in sys.stdin.readline().split())
    n.sort()
    print(n[-1] - n[0])


if __name__ == "__main__":
    
    main()

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

ans = (max(A) - min(A))

print(ans)

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[1] - a[0] + (a[2] - a[1])))

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

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

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

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

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

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

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

Solution (Python):

a = [int(s) for s in input().split()]
a.sort()
print(abs(a[0] - a[1]) + abs(a[1] - a[2]))

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

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

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

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

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

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

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

print(max(a,b,c)-min(a,b,c))

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

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(min(
    abs(b-a)+abs(c-b),
    abs(c-a)+abs(b-c),
    abs(a-b)+abs(c-a),
    abs(c-b)+abs(a-c),
    abs(a-c)+abs(b-a),
    abs(b-c)+abs(a-b)
))

Solution (Python):


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

Solution (Python):
*a,=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 = list(map(int,input().split()))
A.sort()
print(A[2] - A[0])

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

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

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

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]
a,b,c=map(int,input().split())
ans=float('inf')
ans=min(ans,abs(c-b)+abs(b-a))
ans=min(ans,abs(b-c)+abs(c-a))
ans=min(ans,abs(c-a)+abs(a-b))
ans=min(ans,abs(a-c)+abs(c-b))
ans=min(ans,abs(b-a)+abs(a-c))
ans=min(ans,abs(a-b)+abs(b-c))
print(ans)

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

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

print(max(a)-min(a))

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

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

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

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

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

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

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

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

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

Solution (Python):
A = list(map(int,input().split()))
Asub = [abs(A[i]-A[i+1]) if i != 2 else abs(A[i]-A[0]) for i in range(3)]
print(sum(Asub)-max(Asub))

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

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

print(max(a)-min(a))

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

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

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

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

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

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

a.sort()
result = 0
for i in range(2):
    result += abs(a[i]-a[i+1])
print(result)

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

Solution (Python):
a = sorted(list(map(int, input().split())))
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):
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,b,c = sorted([int(i) for i in input().split()])

print((b-a) + (c-b))

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

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

A = list(map(int,read().split()))

answer = max(A) - min(A)
print(answer)

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

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()))

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

Solution (Python):

import itertools
a1,a2,a3 = map(int, input().split())




seq = [a1,a2,a3]
ans = a1+a2+a3

for perm in list(itertools.permutations(seq)):
    cost = 0 + abs(perm[1]-perm[0]) + abs(perm[2]-perm[1])
    if cost < ans:
        ans = cost
        
print(ans)

Solution (Python):
from itertools import permutations
l = map(int,input().split())

ans = float("inf")
for a, b, c in permutations(l, 3):
    res = abs(b-a) + abs(c-b)
    ans = min(ans, res)

print(ans)

Solution (Python):
l=list(map(int,input().split()))
l.sort()
print(l[-1]-l[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())
print(max(a)-min(a))

Solution (Python):
n = list(map(int, input().split()))
n_sorted = sorted(n, reverse = True)

abs_1=abs(n_sorted[0] - n_sorted[1])
abs_2 = abs(n_sorted[1]-n_sorted[2])
print(abs_1 + abs_2)

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

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

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

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

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

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

ans = 0
hoge.sort()

now = hoge[0]
for i in range(1, 3):
    ans += abs(now-hoge[i])
    now = hoge[i]

print(ans)

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

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

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

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,b,c = sorted(map(int, input().split()))
print(c-a)

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

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())
d,e,f=abs(a-b),abs(a-c),abs(b-c)
print(d+e+f-max(d,e,f))

Solution (Python):
A=list(map(int, input().split()))
indexs=[[0,1,2],[0,2,1],[1,0,2],[1,2,0],[2,0,1],[2,1,0]]
n=[]
for i in range(6):
  n.append(abs(A[indexs[i][0]]-A[indexs[i][1]])+abs(A[indexs[i][1]]-A[indexs[i][2]]))
  
print(min(n))

Solution (Python):
a1, a2, a3 = map(int, input().split())
d1 = abs(a1 - a2)
d2 = abs(a1 - a3)
d3 = abs(a2 - a3)
ans = d1 + d2 + d3 - max(d1, d2, d3)
print(ans)

Solution (Python):
A,B,C = (int(x) for x in input().split())
list = [A,B,C]
list.sort()

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

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

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

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

costs = [abs(A1 - A2), abs(A2 - A3), abs(A3 - A1)]
costs.sort()

print(costs[0] + costs[1])

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

D=abs(A-B)
E=abs(B-C)
F=abs(C-A)

if D>=E and D>=F:
  print(E+F)
elif E>=D and E>=F:
  print(D+F)
elif F>=D and F>=E:
  print(D+E)

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

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

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

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):
from itertools import permutations
A = list(map(int, input().split()))
ans = float('inf')
for p in permutations(A):
    ans = min(ans, abs(p[0]-p[1])+abs(p[1]-p[2]))
print(ans)

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

Solution (Python):
a,b,c = map(int,input().split())
if a >= b >= c:
  s1 = a
  s2 = b
  s3 = c
elif a >= c >= b:
  s1 = a
  s2 = c
  s3 = b
elif b >= a >= c:
  s1 = b
  s2 = a
  s3 = c
elif b >= c >= a:
  s1 = b
  s2 = c
  s3 = a
elif c >= a >= b:
  s1 = c
  s2 = a
  s3 = b
elif c >= b >= a:
  s1 = c
  s2 = b
  s3 = a

print(abs(s1-s2) + abs(s2-s3))

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

b = sorted(A)

c = b[2]-b[1] + b[1]-b[0]

print(c)

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

ans = float("inf")
for i in range(len(A)):
    for j in range(len(A)):
        for k in range(len(A)):
            if i == j or j == k or k == i:
                continue
            tmp = abs(A[j] - A[i]) + abs(A[k] - A[j])
            ans = min(ans, tmp)
print(ans)

Solution (Python):
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

a = sorted(nl())

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

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

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

ans = 0

for i in range(1,3):
    ans += abs(a[i]-a[i-1])
print(ans)

Solution (Python):
a = [int(_) for _ in input().split()]
a1 = abs(a[0]-a[1])
a2 = abs(a[1]-a[2])
a3 = abs(a[2]-a[0])
print((a1+a2+a3) - max(a1,a2,a3))

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

Solution (Python):
def main():
    A = [int(s) for s in input().split()]
    Cost_Ptn = []
    Zero2One = abs(A[0] - A[1])
    One2Two = abs(A[1] - A[2])
    Two2Zero = abs(A[2] - A[0])

    Cost_Ptn.append(Zero2One + One2Two)
    Cost_Ptn.append(Two2Zero + Zero2One)
    Cost_Ptn.append(Two2Zero + One2Two)

    reCost_Ptn = sorted(Cost_Ptn)
    print(reCost_Ptn[0])

if __name__ == "__main__":
    main()

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()))
print(max(A)-min(A))

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

score_list = []
for i in range(3):
    score = 0
    score += abs(A_list[i] - A_list[i + 1]) +\
             abs(A_list[i + 1] - A_list[i + 2])
    score_list.append(score)

print(min(score_list))

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

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

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

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

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

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