#yuki857 x,y,z=map(int,raw_input().split()) if y<=z: print z-2 elif x<=z<=y: print z-1 else: print z