A, B, C = list(map(int, input().split()))

retval = B // A

print((min(retval, C)))
A, B, C = list(map(int, input().split()))



print((min(C, B // A)))
A, B, C = list(map(int, input().split()))
retval = B // A
print((min(retval, C)))

A, B, C = list(map(int, input().split()))
print((min(C, B // A)))

-retval = B // A -print((min(retval, C))) +print((min(C, B // A)))