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