x, y, z = map(int,input().split()) if x <= z : z-= 1 if y <= z and x != y : z-=1 print(z)