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