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

x=0

while (A-1)*x+1<B:

    x+=1

print(x)
a, b = list(map(int, input().split()))

print((-(-(b-1)//(a-1))))

A, B = list(map(int, input().split()))
x = 0
while (A - 1) * x + 1 < B:
    x += 1
print(x)

a, b = list(map(int, input().split()))
print((-(-(b - 1) // (a - 1))))

-A, B = list(map(int, input().split())) -x = 0 -while (A - 1) * x + 1 < B: -    x += 1 -print(x) +a, b = list(map(int, input().split())) +print((-(-(b - 1) // (a - 1))))