X, Y, Z = map(int(input().split())) if Y <= Z: Z -= 1 if X <= Z: Z -= 1 print(Z)