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