X, Y, Z = map(int, input().split()) if Z == 0: print(min(X, Y)) else: print((X + Y + Z) // 2)