a,b,c=map(int,input().split()) if abs(a-b)<=c: print((a+b+c)//2) else: print(min(a,b)+c)