def Main(): a,b,c=map(int,input().split()) x=min(a,b) y=max(a,b) if y-x>c: print(x+c) else: print((a+b+c)//2) Main()