X, Y, Z = map(int, input().split()) print(max(X, Y) + (((min(X, Y) + Z) - max(X, Y)) // 2))