X, Y, Z = map(int, input().split()) print(int(min(X, Y) + (Z if abs(X - Y) > Z else (abs(X - Y) + Z) / 2)))