import sys readline=sys.stdin.readline X,Y,Z=map(int,readline().split()) if X>Y: X,Y=Y,X ans=X Y-=X X-=X ans+=min((Y+Z)//2,Z) print(ans)