x,y,z=map(int,input().split()) print(min(x,y)+(z-abs(x-y)//2))