import sys

input = sys.stdin.readline



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

cnt = 0

a.sort()

cnt += a[-1] - a[1]

a[0] += cnt

if (a[-1] - a[0]) % 2 == 1:

    cnt += 1

    a[-1] += 1

cnt += (a[-1] - a[0]) // 2

print(cnt)    
import sys

input = sys.stdin.readline



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

a.sort()

ans = 0

ans += a[2] - a[1]

a[0] += ans

if (a[2] - a[0]) % 2 == 0:

    ans += (a[2] - a[0])//2

    print(ans)

else:

    ans += (a[2] - a[0])//2

    ans += 2

    print(ans)



import sys

input = sys.stdin.readline
a = [int(x) for x in input().split()]
cnt = 0
a.sort()
cnt += a[-1] - a[1]
a[0] += cnt
if (a[-1] - a[0]) % 2 == 1:
    cnt += 1
    a[-1] += 1
cnt += (a[-1] - a[0]) // 2
print(cnt)

import sys

input = sys.stdin.readline
a = [int(x) for x in input().split()]
a.sort()
ans = 0
ans += a[2] - a[1]
a[0] += ans
if (a[2] - a[0]) % 2 == 0:
    ans += (a[2] - a[0]) // 2
    print(ans)
else:
    ans += (a[2] - a[0]) // 2
    ans += 2
    print(ans)

-cnt = 0 -cnt += a[-1] - a[1] -a[0] += cnt -if (a[-1] - a[0]) % 2 == 1: -    cnt += 1 -    a[-1] += 1 -cnt += (a[-1] - a[0]) // 2 -print(cnt) +ans = 0 +ans += a[2] - a[1] +a[0] += ans +if (a[2] - a[0]) % 2 == 0: +    ans += (a[2] - a[0]) // 2 +    print(ans) +else: +    ans += (a[2] - a[0]) // 2 +    ans += 2 +    print(ans)