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