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