n = [0, 0, 0] n[0], n[1], n[2] = map(int, input().split()) if min(n) == 0 and max(n) < 3: print(0) else: n.sort() a = n[1] - n[0] b = n[2] - n[0] x = int((a + b) / 4) + n[0] if a % 2 == 0 and b % 2 == 0: x -= 1 if a % 2 == 1 and b % 2 == 1: x -= 1 print(x)