x,y,z = map(int,input().split()) while z != 0: if x <= y: x += 1 else: y += 1 z -= 1 print(min(x,y))