x, y, z = map(int, input().split()) s = z - abs(x - y) print(max(x, y) + s // 2)