x,y,z = [int(i) for i in input().split()] print(max(x + (z - (abs(x-y)))//2, y + (z-(abs(y-x)))//2))