x, y, z = map(int, input().split()) if x > y: x, y = y, x if y - x > z: ans = x + z else: ans = (x + y + z) // 2 print(ans)