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