c = 0 X, Y, Z = (int(x) for x in input().split()) if X <= Z < Y: c = Z - 1 if Z