while 1: try: a,b,c=map(int,input().split()) except: break lo,hi=1,int(1e18) while lo=c: hi=mi else: lo=mi+1 print(lo)