x,y,z = map(int,input().split()) if x < y : x,y = y,x a = x -y if a >= z: r = y + z else: r = y + a r += (z-a)//2 print(r)