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


N = LI()
N.sort()
A, B, C = N
a = (C - A) // 2
A += a * 2
b = (C - B) // 2
B += b * 2
if A == B == C:
    ans = a + b
elif A == B:
    ans = a + b + 1
else:
    ans = a + b + 2
print(ans)

ac2c9ddf2e74e982939ff3c6f9dbd49767d65bb6
<mask token>

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


<mask token>

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


<mask token>
N.sort()
<mask token>
A += a * 2
<mask token>
B += b * 2
if A == B == C:
    ans = a + b
elif A == B:
    ans = a + b + 1
else:
    ans = a + b + 2
print(ans)

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


N = LI()
N.sort()
A, B, C = N
a = (C - A) // 2
A += a * 2
b = (C - B) // 2
B += b * 2
if A == B == C:
    ans = a + b
elif A == B:
    ans = a + b + 1
else:
    ans = a + b + 2
print(ans)
