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

ans = 0

def calc(a, b):

    if a < b:

        r = b-a

        if r % 2:

            return r//2 + 2

        return r//2

    else:

        return a-b

def solve(a, b, c):

    return calc(a, c) + calc(b, c)

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

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

a = c-a; b = c-b

p = a%2; q = b%2

if p and q:

    print((a//2+b//2+1))

elif p or q:

    print((a//2+b//2+2))

else:

    print((a//2+b//2))

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


def calc(a, b):
    if a < b:
        r = b - a
        if r % 2:
            return r // 2 + 2
        return r // 2
    else:
        return a - b


def solve(a, b, c):
    return calc(a, c) + calc(b, c)


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

a, b, c = sorted(map(int, input().split()))
a = c - a
b = c - b
p = a % 2
q = b % 2
if p and q:
    print((a // 2 + b // 2 + 1))
elif p or q:
    print((a // 2 + b // 2 + 2))
else:
    print((a // 2 + b // 2))

-a, b, c = list(map(int, input().split())) -ans = 0 - - -def calc(a, b): -    if a < b: -        r = b - a -        if r % 2: -            return r // 2 + 2 -        return r // 2 -    else: -        return a - b - - -def solve(a, b, c): -    return calc(a, c) + calc(b, c) - - -print((min(solve(a, b, c), solve(b, c, a), solve(c, a, b)))) +a, b, c = sorted(map(int, input().split())) +a = c - a +b = c - b +p = a % 2 +q = b % 2 +if p and q: +    print((a // 2 + b // 2 + 1)) +elif p or q: +    print((a // 2 + b // 2 + 2)) +else: +    print((a // 2 + b // 2))