x, y, z = map(int, input().split())
print(z - (z >= x) - (z >= y))