Problem:
 Score : 200 points    Problem Statement Takahashi's house has only one socket.  Takahashi wants to extend it with some number of power strips, each with A sockets, into B or more empty sockets.  One power strip with A sockets can extend one empty socket into A empty sockets.  Find the minimum number of power strips required.      Constraints  All values in input are integers.  2 \leq A \leq 20  1 \leq B \leq 20         Input Input is given from Standard Input in the following format:  A  B       Output Print the minimum number of power strips required.        Sample Input 1 4 10      Sample Output 1 3  3 power strips, each with 4 sockets, extend the socket into 10 empty sockets.       Sample Input 2 8 9      Sample Output 2 2  2 power strips, each with 8 sockets, extend the socket into 15 empty sockets.       Sample Input 3 8 8      Sample Output 3 1

Solution (Python):

a, b = map(int, input().split())
ans = 1
still = 1
while still < b:
    ans += 1
    still += a - 1
print(ans - 1)

Solution (Python):
def main():
    a, b = map(int, input().split())
    count = 1
    nes = 0
    if b == 1:
        print("0")
    elif a >= b:
        print("1")
    else:   
        while count < b:
            count += a - 1
            nes += 1
        print(nes)

if __name__ == "__main__":
    main()

Solution (Python):
a,b=map(int,input().split())
ans=0
now=1
for i in range(20):
  if(now>=b):
    print(ans)
    exit()
  
  ans+=1
  now+=a-1

Solution (Python):
a, b = map(int, input().split(' '))

import math


x = math.ceil((b - 1) / (a - 1))
print(x)

Solution (Python):
a, b = map(int, input().split())
cnt = 0
while 1:
    if 1 + (a-1)*cnt >= b:
        print(cnt)
        break
    cnt += 1

Solution (Python):
from math import ceil
ans = """
a,b = (int(i) for i in input().split())
"""
for a in range(2,21):
    if a == 2:
        ans += "if a == " + str(a) + ":\n"
    else:
        ans += "elif a == " + str(a) + ":\n"
    for b in range(1,21):
        if b == 1:
            ans += "\tif b == " + str(b) + ":\n"
        else:
            ans += "\telif b == " + str(b) + ":\n"
        ans += "\t\tans = "+str(ceil(((b-1)/(a-1)))) + "\n"
ans += "print(ans)"
exec(ans)

Solution (Python):
a,b = (int(i) for i in input().split())
if a == 2:
	if b == 1:
		ans = 0
	elif b == 2:
		ans = 1
	elif b == 3:
		ans = 2
	elif b == 4:
		ans = 3
	elif b == 5:
		ans = 4
	elif b == 6:
		ans = 5
	elif b == 7:
		ans = 6
	elif b == 8:
		ans = 7
	elif b == 9:
		ans = 8
	elif b == 10:
		ans = 9
	elif b == 11:
		ans = 10
	elif b == 12:
		ans = 11
	elif b == 13:
		ans = 12
	elif b == 14:
		ans = 13
	elif b == 15:
		ans = 14
	elif b == 16:
		ans = 15
	elif b == 17:
		ans = 16
	elif b == 18:
		ans = 17
	elif b == 19:
		ans = 18
	elif b == 20:
		ans = 19
elif a == 3:
	if b == 1:
		ans = 0
	elif b == 2:
		ans = 1
	elif b == 3:
		ans = 1
	elif b == 4:
		ans = 2
	elif b == 5:
		ans = 2
	elif b == 6:
		ans = 3
	elif b == 7:
		ans = 3
	elif b == 8:
		ans = 4
	elif b == 9:
		ans = 4
	elif b == 10:
		ans = 5
	elif b == 11:
		ans = 5
	elif b == 12:
		ans = 6
	elif b == 13:
		ans = 6
	elif b == 14:
		ans = 7
	elif b == 15:
		ans = 7
	elif b == 16:
		ans = 8
	elif b == 17:
		ans = 8
	elif b == 18:
		ans = 9
	elif b == 19:
		ans = 9
	elif b == 20:
		ans = 10
elif a == 4:
	if b == 1:
		ans = 0
	elif b == 2:
		ans = 1
	elif b == 3:
		ans = 1
	elif b == 4:
		ans = 1
	elif b == 5:
		ans = 2
	elif b == 6:
		ans = 2
	elif b == 7:
		ans = 2
	elif b == 8:
		ans = 3
	elif b == 9:
		ans = 3
	elif b == 10:
		ans = 3
	elif b == 11:
		ans = 4
	elif b == 12:
		ans = 4
	elif b == 13:
		ans = 4
	elif b == 14:
		ans = 5
	elif b == 15:
		ans = 5
	elif b == 16:
		ans = 5
	elif b == 17:
		ans = 6
	elif b == 18:
		ans = 6
	elif b == 19:
		ans = 6
	elif b == 20:
		ans = 7
elif a == 5:
	if b == 1:
		ans = 0
	elif b == 2:
		ans = 1
	elif b == 3:
		ans = 1
	elif b == 4:
		ans = 1
	elif b == 5:
		ans = 1
	elif b == 6:
		ans = 2
	elif b == 7:
		ans = 2
	elif b == 8:
		ans = 2
	elif b == 9:
		ans = 2
	elif b == 10:
		ans = 3
	elif b == 11:
		ans = 3
	elif b == 12:
		ans = 3
	elif b == 13:
		ans = 3
	elif b == 14:
		ans = 4
	elif b == 15:
		ans = 4
	elif b == 16:
		ans = 4
	elif b == 17:
		ans = 4
	elif b == 18:
		ans = 5
	elif b == 19:
		ans = 5
	elif b == 20:
		ans = 5
elif a == 6:
	if b == 1:
		ans = 0
	elif b == 2:
		ans = 1
	elif b == 3:
		ans = 1
	elif b == 4:
		ans = 1
	elif b == 5:
		ans = 1
	elif b == 6:
		ans = 1
	elif b == 7:
		ans = 2
	elif b == 8:
		ans = 2
	elif b == 9:
		ans = 2
	elif b == 10:
		ans = 2
	elif b == 11:
		ans = 2
	elif b == 12:
		ans = 3
	elif b == 13:
		ans = 3
	elif b == 14:
		ans = 3
	elif b == 15:
		ans = 3
	elif b == 16:
		ans = 3
	elif b == 17:
		ans = 4
	elif b == 18:
		ans = 4
	elif b == 19:
		ans = 4
	elif b == 20:
		ans = 4
elif a == 7:
	if b == 1:
		ans = 0
	elif b == 2:
		ans = 1
	elif b == 3:
		ans = 1
	elif b == 4:
		ans = 1
	elif b == 5:
		ans = 1
	elif b == 6:
		ans = 1
	elif b == 7:
		ans = 1
	elif b == 8:
		ans = 2
	elif b == 9:
		ans = 2
	elif b == 10:
		ans = 2
	elif b == 11:
		ans = 2
	elif b == 12:
		ans = 2
	elif b == 13:
		ans = 2
	elif b == 14:
		ans = 3
	elif b == 15:
		ans = 3
	elif b == 16:
		ans = 3
	elif b == 17:
		ans = 3
	elif b == 18:
		ans = 3
	elif b == 19:
		ans = 3
	elif b == 20:
		ans = 4
elif a == 8:
	if b == 1:
		ans = 0
	elif b == 2:
		ans = 1
	elif b == 3:
		ans = 1
	elif b == 4:
		ans = 1
	elif b == 5:
		ans = 1
	elif b == 6:
		ans = 1
	elif b == 7:
		ans = 1
	elif b == 8:
		ans = 1
	elif b == 9:
		ans = 2
	elif b == 10:
		ans = 2
	elif b == 11:
		ans = 2
	elif b == 12:
		ans = 2
	elif b == 13:
		ans = 2
	elif b == 14:
		ans = 2
	elif b == 15:
		ans = 2
	elif b == 16:
		ans = 3
	elif b == 17:
		ans = 3
	elif b == 18:
		ans = 3
	elif b == 19:
		ans = 3
	elif b == 20:
		ans = 3
elif a == 9:
	if b == 1:
		ans = 0
	elif b == 2:
		ans = 1
	elif b == 3:
		ans = 1
	elif b == 4:
		ans = 1
	elif b == 5:
		ans = 1
	elif b == 6:
		ans = 1
	elif b == 7:
		ans = 1
	elif b == 8:
		ans = 1
	elif b == 9:
		ans = 1
	elif b == 10:
		ans = 2
	elif b == 11:
		ans = 2
	elif b == 12:
		ans = 2
	elif b == 13:
		ans = 2
	elif b == 14:
		ans = 2
	elif b == 15:
		ans = 2
	elif b == 16:
		ans = 2
	elif b == 17:
		ans = 2
	elif b == 18:
		ans = 3
	elif b == 19:
		ans = 3
	elif b == 20:
		ans = 3
elif a == 10:
	if b == 1:
		ans = 0
	elif b == 2:
		ans = 1
	elif b == 3:
		ans = 1
	elif b == 4:
		ans = 1
	elif b == 5:
		ans = 1
	elif b == 6:
		ans = 1
	elif b == 7:
		ans = 1
	elif b == 8:
		ans = 1
	elif b == 9:
		ans = 1
	elif b == 10:
		ans = 1
	elif b == 11:
		ans = 2
	elif b == 12:
		ans = 2
	elif b == 13:
		ans = 2
	elif b == 14:
		ans = 2
	elif b == 15:
		ans = 2
	elif b == 16:
		ans = 2
	elif b == 17:
		ans = 2
	elif b == 18:
		ans = 2
	elif b == 19:
		ans = 2
	elif b == 20:
		ans = 3
elif a == 11:
	if b == 1:
		ans = 0
	elif b == 2:
		ans = 1
	elif b == 3:
		ans = 1
	elif b == 4:
		ans = 1
	elif b == 5:
		ans = 1
	elif b == 6:
		ans = 1
	elif b == 7:
		ans = 1
	elif b == 8:
		ans = 1
	elif b == 9:
		ans = 1
	elif b == 10:
		ans = 1
	elif b == 11:
		ans = 1
	elif b == 12:
		ans = 2
	elif b == 13:
		ans = 2
	elif b == 14:
		ans = 2
	elif b == 15:
		ans = 2
	elif b == 16:
		ans = 2
	elif b == 17:
		ans = 2
	elif b == 18:
		ans = 2
	elif b == 19:
		ans = 2
	elif b == 20:
		ans = 2
elif a == 12:
	if b == 1:
		ans = 0
	elif b == 2:
		ans = 1
	elif b == 3:
		ans = 1
	elif b == 4:
		ans = 1
	elif b == 5:
		ans = 1
	elif b == 6:
		ans = 1
	elif b == 7:
		ans = 1
	elif b == 8:
		ans = 1
	elif b == 9:
		ans = 1
	elif b == 10:
		ans = 1
	elif b == 11:
		ans = 1
	elif b == 12:
		ans = 1
	elif b == 13:
		ans = 2
	elif b == 14:
		ans = 2
	elif b == 15:
		ans = 2
	elif b == 16:
		ans = 2
	elif b == 17:
		ans = 2
	elif b == 18:
		ans = 2
	elif b == 19:
		ans = 2
	elif b == 20:
		ans = 2
elif a == 13:
	if b == 1:
		ans = 0
	elif b == 2:
		ans = 1
	elif b == 3:
		ans = 1
	elif b == 4:
		ans = 1
	elif b == 5:
		ans = 1
	elif b == 6:
		ans = 1
	elif b == 7:
		ans = 1
	elif b == 8:
		ans = 1
	elif b == 9:
		ans = 1
	elif b == 10:
		ans = 1
	elif b == 11:
		ans = 1
	elif b == 12:
		ans = 1
	elif b == 13:
		ans = 1
	elif b == 14:
		ans = 2
	elif b == 15:
		ans = 2
	elif b == 16:
		ans = 2
	elif b == 17:
		ans = 2
	elif b == 18:
		ans = 2
	elif b == 19:
		ans = 2
	elif b == 20:
		ans = 2
elif a == 14:
	if b == 1:
		ans = 0
	elif b == 2:
		ans = 1
	elif b == 3:
		ans = 1
	elif b == 4:
		ans = 1
	elif b == 5:
		ans = 1
	elif b == 6:
		ans = 1
	elif b == 7:
		ans = 1
	elif b == 8:
		ans = 1
	elif b == 9:
		ans = 1
	elif b == 10:
		ans = 1
	elif b == 11:
		ans = 1
	elif b == 12:
		ans = 1
	elif b == 13:
		ans = 1
	elif b == 14:
		ans = 1
	elif b == 15:
		ans = 2
	elif b == 16:
		ans = 2
	elif b == 17:
		ans = 2
	elif b == 18:
		ans = 2
	elif b == 19:
		ans = 2
	elif b == 20:
		ans = 2
elif a == 15:
	if b == 1:
		ans = 0
	elif b == 2:
		ans = 1
	elif b == 3:
		ans = 1
	elif b == 4:
		ans = 1
	elif b == 5:
		ans = 1
	elif b == 6:
		ans = 1
	elif b == 7:
		ans = 1
	elif b == 8:
		ans = 1
	elif b == 9:
		ans = 1
	elif b == 10:
		ans = 1
	elif b == 11:
		ans = 1
	elif b == 12:
		ans = 1
	elif b == 13:
		ans = 1
	elif b == 14:
		ans = 1
	elif b == 15:
		ans = 1
	elif b == 16:
		ans = 2
	elif b == 17:
		ans = 2
	elif b == 18:
		ans = 2
	elif b == 19:
		ans = 2
	elif b == 20:
		ans = 2
elif a == 16:
	if b == 1:
		ans = 0
	elif b == 2:
		ans = 1
	elif b == 3:
		ans = 1
	elif b == 4:
		ans = 1
	elif b == 5:
		ans = 1
	elif b == 6:
		ans = 1
	elif b == 7:
		ans = 1
	elif b == 8:
		ans = 1
	elif b == 9:
		ans = 1
	elif b == 10:
		ans = 1
	elif b == 11:
		ans = 1
	elif b == 12:
		ans = 1
	elif b == 13:
		ans = 1
	elif b == 14:
		ans = 1
	elif b == 15:
		ans = 1
	elif b == 16:
		ans = 1
	elif b == 17:
		ans = 2
	elif b == 18:
		ans = 2
	elif b == 19:
		ans = 2
	elif b == 20:
		ans = 2
elif a == 17:
	if b == 1:
		ans = 0
	elif b == 2:
		ans = 1
	elif b == 3:
		ans = 1
	elif b == 4:
		ans = 1
	elif b == 5:
		ans = 1
	elif b == 6:
		ans = 1
	elif b == 7:
		ans = 1
	elif b == 8:
		ans = 1
	elif b == 9:
		ans = 1
	elif b == 10:
		ans = 1
	elif b == 11:
		ans = 1
	elif b == 12:
		ans = 1
	elif b == 13:
		ans = 1
	elif b == 14:
		ans = 1
	elif b == 15:
		ans = 1
	elif b == 16:
		ans = 1
	elif b == 17:
		ans = 1
	elif b == 18:
		ans = 2
	elif b == 19:
		ans = 2
	elif b == 20:
		ans = 2
elif a == 18:
	if b == 1:
		ans = 0
	elif b == 2:
		ans = 1
	elif b == 3:
		ans = 1
	elif b == 4:
		ans = 1
	elif b == 5:
		ans = 1
	elif b == 6:
		ans = 1
	elif b == 7:
		ans = 1
	elif b == 8:
		ans = 1
	elif b == 9:
		ans = 1
	elif b == 10:
		ans = 1
	elif b == 11:
		ans = 1
	elif b == 12:
		ans = 1
	elif b == 13:
		ans = 1
	elif b == 14:
		ans = 1
	elif b == 15:
		ans = 1
	elif b == 16:
		ans = 1
	elif b == 17:
		ans = 1
	elif b == 18:
		ans = 1
	elif b == 19:
		ans = 2
	elif b == 20:
		ans = 2
elif a == 19:
	if b == 1:
		ans = 0
	elif b == 2:
		ans = 1
	elif b == 3:
		ans = 1
	elif b == 4:
		ans = 1
	elif b == 5:
		ans = 1
	elif b == 6:
		ans = 1
	elif b == 7:
		ans = 1
	elif b == 8:
		ans = 1
	elif b == 9:
		ans = 1
	elif b == 10:
		ans = 1
	elif b == 11:
		ans = 1
	elif b == 12:
		ans = 1
	elif b == 13:
		ans = 1
	elif b == 14:
		ans = 1
	elif b == 15:
		ans = 1
	elif b == 16:
		ans = 1
	elif b == 17:
		ans = 1
	elif b == 18:
		ans = 1
	elif b == 19:
		ans = 1
	elif b == 20:
		ans = 2
elif a == 20:
	if b == 1:
		ans = 0
	elif b == 2:
		ans = 1
	elif b == 3:
		ans = 1
	elif b == 4:
		ans = 1
	elif b == 5:
		ans = 1
	elif b == 6:
		ans = 1
	elif b == 7:
		ans = 1
	elif b == 8:
		ans = 1
	elif b == 9:
		ans = 1
	elif b == 10:
		ans = 1
	elif b == 11:
		ans = 1
	elif b == 12:
		ans = 1
	elif b == 13:
		ans = 1
	elif b == 14:
		ans = 1
	elif b == 15:
		ans = 1
	elif b == 16:
		ans = 1
	elif b == 17:
		ans = 1
	elif b == 18:
		ans = 1
	elif b == 19:
		ans = 1
	elif b == 20:
		ans = 1
print(ans)

Solution (Python):
a, b = map(int, input().split())
ans = 0
outlet = 1
while b > outlet:
    ans += 1
    outlet -= 1
    outlet += a
print(ans)

Solution (Python):
x = input().split()
a = int(x[0])
b = int(x[1])
total = 1
count = 0

while total < b:
    total -= 1
    total += a
    count += 1

print(count)

Solution (Python):
a,b = map(int,input().split())
c = 0
for i in range(21):
    if i == 0:
        c = 1
    else:
        c = a + (a-1) * (i-1)
    
    if c >= b:
        print(i)
        break

Solution (Python):

a, b = map(int, input().split())
ans = 0
outlet = 1
while outlet < b:
    outlet = outlet - 1
    outlet = outlet + a
    ans = ans + 1
print(ans)

Solution (Python):
def power():
    A, B = map(int, input().split())
    socket = 1
    numberOfStrips = 0

    while socket < B:
        socket = socket + A - 1
        numberOfStrips = numberOfStrips + 1

    return numberOfStrips


print(power())

Solution (Python):
import math

A, B = map(int, input().split())
if B == 1:
    print(0)
else:
    ans = math.ceil(B / A)
    while A * ans - (ans - 1) < B:
        ans += 1
    print(ans)

Solution (Python):
t,h=map(int,input().split())
print((h-2)//(t-1)+1)

Solution (Python):
A,B=map(int,input().split())
ans=(B-1)//(A-1)
ans+= (B-1)%(A-1)!=0
print(ans)

Solution (Python):
a,b = map(int, input().split())
print(-(-(b-1)//(a-1)))

Solution (Python):
import sys
import math
input = sys.stdin.readline

A, B = map(int, input().split())
print(math.ceil((B-1)/(A-1)))

Solution (Python):
A, B = map(int, input().split())
n = 1
tap = 0
while n < B:
    tap += 1
    n += A - 1
print(tap)

Solution (Python):


import sys
import copy
import math

sys.setrecursionlimit(1000000)





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

S = A - 1
T = B - 1

print((S + T - 1) // S)

Solution (Python):

a, b = map(int, input().split())

ans = -( -(b - 1) // (a - 1))

print(ans)

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

Solution (Python):
A,B = map(int, input().split())

for i in range(20):
  if A*i-(i-1) >= B:
    print(i)
    exit()

Solution (Python):
A,B=map(int,input().split())
c=0
B-=1
while B>0:
    c+=1
    B-=A-1
print(c)

Solution (Python):
a, b = map(int, input().split())

a -= 1
b -= 1
ans = 0
while True:
    if b <= 0:
        print(ans)
        break
    ans += 1
    b = b-a

Solution (Python):
a, b = list(map(int, input().split()))
ans = 0
count = 1
if b != 1:
    while count < b:
        count += a - 1
        ans += 1
print(ans)

Solution (Python):
A,B=map(int,input().split())
import math
print(math.ceil((B-1)/(A-1)))

Solution (Python):
A,B=map(int,input().split())
cnt=0
outlet=1
while outlet<B:
  cnt=cnt+1
  outlet=outlet+(A-1)
print(cnt)

Solution (Python):
a,b = map(int,input().split())
if (b-1)%(a-1) == 0:
  print((b-1)//(a-1))
else:
  print((b-1)//(a-1)+1)

Solution (Python):
import math
A,B = [int(i) for i in input().split()]
print(math.ceil((B-1)/(A-1)))

Solution (Python):
a, b = map(int, input().strip().split())
print(max(0, (b-2)//(a-1)+1))

Solution (Python):
a,b=map(int,input().split())
print(-((-b+1)//(a-1)))

Solution (Python):
a,b=map(int,input().split())
n=0
k=(a-1)*n+1
while b>(a-1)*n+1:
  n+=1
print(n)

Solution (Python):
A, B = map(int, input().split())
now = 1
ans = 0
while now < B:
  now += A-1
  ans += 1
print(ans)

Solution (Python):
a,b=map(int,input().split());c=a-1;d=b-1;print(d//c+1if d%c!=0else d//c)

Solution (Python):
import math
a,b=map(int,input().split())
print(math.ceil((b-1)/(a-1)))

Solution (Python):
A,B = list(map(int,input().split()))
ans = 1
i = 0
while ans < B:
  ans += A-1
  i +=1
print(i)

Solution (Python):
A,B = map(int,input().split())

ans = 0

while B > 1+ans*A-ans:
    ans += 1
print(ans)

Solution (Python):
import math
a,b=map(int,input().split())
print(math.ceil((b-1)/(a-1)))

Solution (Python):
a,b = map(int, input().split())
n = (b-1) // (a-1)
if (b-1) % (a-1) != 0:
    n += 1
print(n)

Solution (Python):
a, b = map(int, input().split())

if b == 1:
    print(0)
    exit()

ans = 0
c = b - a
ans+=1
while (c>0):
    c -= (a-1)
    ans+=1
 
print(ans)

Solution (Python):
a,b=map(int,input().split())
if b ==1:
    print(0)
else:
    for i in range(30):
        if a+(a-1)*i>=b:
            print(i+1)
            break

Solution (Python):
x=[int(e) for e in input().split()]
a=x[0]
b=x[1]
c=1
k=0
while c<b:
  c+=a-1
  k+=1
print(k)

Solution (Python):
a,b = map(int,input().split())
sum = 1
count = 0
while sum < b:
    sum += a - 1
    count += 1
print(count)

Solution (Python):
A, B = map(int,input().split())
Socket = 0
kuchi = 1

while kuchi < B:
    Socket += 1
    kuchi += (A - 1)

print(Socket)

Solution (Python):
def solve(A, B):
    ans = 0
    outlet = 1
    while outlet < B:
        outlet -= 1
        outlet += A
        ans += 1
    return ans


if __name__ == '__main__':
    A, B = map(int, input().split())
    ans = solve(A, B)
    print(ans)

Solution (Python):
A,B = map(int,input().split())
C = 0
x = 0
if B == 1:
  print(x)
  exit()
while C < B:
  x += 1
  C = x * (A-1) + 1
print(x)

Solution (Python):
A, B = [int(i) for i in input().split(' ')]
ans = 0
outlet = 1
while outlet < B:
    outlet -= 1
    outlet += A
    ans += 1
print(ans)

Solution (Python):
a,b=map(int,input().split())
print((b-1)//(a-1) if (b-1)%(a-1)==0 else (b-1)//(a-1)+1)

Solution (Python):
mondai = input().split(" ")
kuchi = int(mondai[0])
want = int(mondai[1])

ans = 0
num = 1
while int(num) < want:
    
    ans += 1
    num = ans * kuchi
    num = num - (ans -1)

print(ans)

Solution (Python):
A,B = map(int,input().split())
con = 1
ans = 0

while B > con:
  ans += 1
  con -= 1
  con += A

print(ans)

Solution (Python):
a,b=map(int,input().split())
if b==1:
    print(0)
else:    
    for i in range(30):
        if a+(a-1)*i >= b:
            print(i+1)
            break

Solution (Python):
A,B=map(int, input().split())
t=0
if B==1:
  t=0
elif A>=B:
  t=1
if (B-A)%(A-1)>0:
  t=1+(B-A)//(A-1)+1
else:
  t=1+(B-A)//(A-1)
print(t)

Solution (Python):
a,b = [int(i) for i in input().split()]
ct = 0
num = 0

while num < b-1:
    ct += 1
    num += a -1
    
print(ct)

Solution (Python):
A,B=map(int, input().split())
n=1
while (A-1)*(n-1)+A<B:
  n+=1
print(n if B!=1 else 0)

Solution (Python):
a, b = map(int, input().split())
x = 1
ans = 0
while x < b:
    x += a - 1
    ans += 1
print(ans)

Solution (Python):
A, B = map(int,input().split())

dp = [0] * 21
dp[0] = 1
if B == 1:
    print(0)
    exit()
for i in range(1, 21):
    dp[i] = dp[i-1] + (A-1)
    if dp[i] >= B:
        print(i)
        exit()

Solution (Python):
import math
ab=list(map(int,input().split()))
print(math.ceil((ab[1]-1)/(ab[0]-1)))

Solution (Python):
import math
a, b = map(int, input().split())
print(math.ceil((b - 1) / (a - 1)))

Solution (Python):
a,b = map(int,input().split())

ans = 0
c = 1
while True:
  if c >= b:
    print(ans)
    break
  else:
    c = c -1 + a
    ans += 1

Solution (Python):
import math

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

Solution (Python):
def check():
    A,B = [int(i) for i in input().split(' ')]
    count = 0
    count_plug = 1
    while count_plug<B:
        count_plug += A - 1
        count += 1
    print(count)
check()

Solution (Python):
import math

def solve():
    A,B = map(int, input().split())
    
    print( math.ceil((B-1)/(A-1)) )
    
solve()

Solution (Python):
a,b = map(int,input().split())
for i in range(20):
    ans = a*i-(i-1)
    if ans >= b:
        print(i)
        break

Solution (Python):
A,B = map(int,input().split())
start = 1
for i in range(20):
    if start >= B:
        print(i)
        break
    start += A - 1

Solution (Python):
a,b = map(int,input().split())

x = b%(a-1)

if a!=2:
  if x<=1:
    print(b//(a-1))
  else:
    print(b//(a-1)+1)
else:
  print(b-1)

Solution (Python):
a, b = map(int, input().split())
hole = 1
for i in range(20):
    if hole >= b:
        print(i)
        break
    hole += a-1

Solution (Python):
A, B = map(int, input().split())
ans = 0;count=1
while B > count:
    if B==1:
        print(0)
        break
    else:
        ans += 1
        count += A-1
print(ans)

Solution (Python):
def resolve():
    A,B = map(int,input().split())
    ans = 1
    temp = A

    while(1):
        if temp < B:
            temp += A-1
            ans += 1
        else:
            break
    if B == 1:
        print(0)
    else:
        print(ans)
resolve()

Solution (Python):
A,B = map(int,input().split())
kuti = 1
k = 0
for i in range(100):
    if kuti>=B:
        print(k)
        break
    elif B == 1:
        print(0)
    else:
        kuti += A-1
        k += 1

Solution (Python):
A,B = map(int, open(0).read().split())
MAX = 20
plug = 1
if(B <= 1):
  print(0)
  exit()
for i in range(MAX):
  plug -= 1
  plug += A
  if(plug >= B):
    print(i+1)
    break
    exit()

Solution (Python):
a,b=map(int,input().split());print(-(-~-b//~-a))

Solution (Python):
def main():
    a, b = scan()
    plag = 1
    cnt = 0
    while plag < b:
        plag -= 1
        plag += a
        cnt += 1
    print(cnt)

def iread():
    return int(input())


def sread():
    return input()


def aread(t="int"):
    if t == "int":
        ret = [int(i) for i in input().split()]
    elif t == "str":
        ret = list(input())
    return ret


def scan():
    return list(map(int, input().split()))


if __name__ == '__main__':
    main()

Solution (Python):
a,b=map(int,input().split());print(0--~-b//~-a)

Solution (Python):
a,b=map(int,input().split());print(0--~-b//~-a)

Solution (Python):
a, b = map(int, raw_input().split())
sockets = 1
cnt = 0
while sockets < b:
  sockets = sockets - 1 + a
  cnt += 1
print cnt

Solution (Python):

a,b=map(int,input().split())
a-=1
b-=1
ans = 1 if b%a != 0 else 0
ans += b//a
print(ans)

Solution (Python):
a,b = map(int,input().split())
if b == 1:
  print(0)
  exit()
c = 0
b -= a
c += 1
while b > 0:
  c += 1
  b -= a-1
print(c)

Solution (Python):
A, B = [int(x) for x in input().split()]

ans = 0
x = 1
while x < B:
  x = A * ans - ans + 1
  ans += 1
ans = ans-1
if ans < 0:
  ans = 0
print(ans)

Solution (Python):
while True:
    try:
        A, B = map(int, input().split())
        if B == 1:
            print(0)
        elif A >= B:
            print(1)
        else:
            A -= 1
            B -= 1
            print(-(-B//A))
    except EOFError:
        break

Solution (Python):
A,B = map(int,input().split())
 
l = 1
n = 0
while l < B:
    l -= 1
    l += A
    n += 1
print(n)

Solution (Python):
a,b=input().split()

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

Solution (Python):
import math
A,B = map(int,input().split())
print(math.ceil((B-1)/(A-1)))

Solution (Python):
a,b=map(int,input().split())
n=1
cnt=0
while(n<b):
  n+=a-1
  cnt+=1
print(cnt)

Solution (Python):
A, B = map(int, input().split())
print((B-1 + A - 2) // (A-1))

Solution (Python):
from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations
import sys
import bisect
import string
sys.setrecursionlimit(10**6)
def SI():
    return input().split()
def MI():
    return map(int,input().split())
def I():
    return int(input())
def LI():
    return [int(i) for i in input().split()]
YN=['Yes','No']
mo=10**9+7

a,b=MI()
ans=1
c=a
while c<b:
    c+=a-1
    ans+=1
print(ans if b!=1 else 0)

Solution (Python):
a,b=map(int,input().split())
x=0
c=1
while c<b:
  c+=(a-1)
  x+=1
print(x)

Solution (Python):
a,b=map(int,input().split())
print((b+a-3)//(a-1))

Solution (Python):
a,b = map(int, input().split())
res = 1
if b == 1:
    print(0)
    exit(0)
while a *res - (res -1 ) < b  :
 res = res + 1
 
print(res)

Solution (Python):
a, b = map(int, input().split())

kuti = a
ans = 1


if b == 1:
    ans = 0
else:
    while kuti < b:
        kuti += a - 1
        ans += 1

print(ans)

Solution (Python):
import sys

ns = lambda: sys.stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: [int(x) for x in ns().split()]
nall = lambda: [int(x) for x in sys.stdin.readlines()]


def main():
    a, b = na()

    
    c = ((b - 1) + (a - 2)) /(a - 1)
    print(int(c))


        
if __name__ == '__main__':
    main()

Solution (Python):
def main():
    a, b = map(int, input().split())
    
    print((b - 1 + a - 2) // (a - 1))


if __name__ == "__main__":
    main()

Solution (Python):
a,b = map(int, input().split())
ans = 0
count = 1
while count < b:
    count += a-1
    ans += 1
print(ans)

Solution (Python):
a,b=map(int,input().split())
count=0
b -=1
while b>0:
    b -=a-1
    count +=1

print(count)

Solution (Python):
a, b = map(int, input().split())
print(-(-(b-1) // (a-1)))

Solution (Python):
import math
a,b = map(int, input().split())
print(math.ceil((b-1)/(a-1)))

Solution (Python):
import math
a, b = map(int, input().split())
print(math.ceil((b - 1) / (a - 1)))

Solution (Python):
a, b = map(int,input().split())

n = 1
ac = a

while ac < b:
  ac += a - 1
  n += 1

if b == 1:
  print(0)
elif a == b:
  print(1)
else:
  print(n)

Solution (Python):
A,B=map(int,input().split())
if (B-A)%(A-1)==0:
    print((B-A)//(A-1)+1)
else:
    print((B-A)//(A-1)+2)

Solution (Python):
a = list(map(int,input().split()))

b=0
for i in range(100000000):
   if(a[1]==1):
      break
   if(i==0):
      if(b>=a[1]): 
         break
      b=a[0]
   else:
      if(b>=a[1]):
         break
      b=b+(a[0]-1)

print(i)

Solution (Python):
a,b = map(int,input().split())
i = 0
while True:
    ss = a * i - (i - 1)
    if ss >= b:
        print(i)
        break
    i += 1

Solution (Python):
A, B = (int(n) for n in input().split())
if B == 1:
    cnt = 0
else:
    B-=A
    cnt = 1
    while(B>0):
        B-=(A-1)
        cnt+=1
print(str(cnt))

Solution (Python):
a, b = map(int, input().split())
now = 1
c = 0
while now < b:
  now = now + a - 1
  c += 1
  
print(c)

Solution (Python):
s = list(map(int,input().split()))
n = 0
m = 0

for i in range(20):
    n = s[0]*i - (i - 1)
    if n >= s[1]:
        m = i
        break

print(m)

Solution (Python):
a, b = map(int, input().split(" "))

count = 0
n = 1
while True:
  if n >= b:
    break
  n += a - 1
  count += 1
  
print(count)

Solution (Python):
a,b = map(int,input().split())
outlet = 1
ans = 0
while outlet < b:
  outlet -= 1
  outlet += a
  ans += 1
  
print(ans)

Solution (Python):
A, B = map(int, input().split())

a = 1
num = 0

while a < B:
    a += (A-1)
    num += 1

print(num)

Solution (Python):
A, B = map(int, input().split())

if B == 1:
    print(0)
    exit()

count = 1
remain = B - A
while remain > 0:
    count += 1
    remain -= (A - 1)

print(count)

Solution (Python):
a, b = list(map(int, input().split()))
s = 1
r = 0
while s < b:
  s += a - 1
  r += 1
print(r)

Solution (Python):


a, b = map(int, input().split())
ans = 0
i = 1
while i < b:
    i -= 1
    i += a
    ans += 1
print(ans)

Solution (Python):
A, B = map(int, input().split())
print(-(-(B-1)//(A-1)))

Solution (Python):
import math
a,b = [int(x) for x in input().split()]
print(math.ceil((b-1)/(a-1)))

Solution (Python):
A, B = map(int, input().split())

if B == 1:
    print(0)
    exit()

count = 1
remain = B - A
while True:
    if remain <= 0:
        print(count)
        break
    count += 1
    remain -= (A - 1)

Solution (Python):
def test2(a, b):
  cnt = 1
  if(b == 1):
    return 0
  if(a >= b):
    return cnt
  limit = 10**10
  for i in range(1, limit):
    cnt += 1
    if((a + ((a-1) * i)) >= b):
      return cnt
a,b=map(int,input().split())
print(test2(a,b))

Solution (Python):
a,b = map(int,input().split())
c = b//a

b -= 1
if b%(a-1) == 0:
    print(b//(a-1))
else:
    print(b//(a-1)+1)

Solution (Python):
a, b = map(int, input().split())

for i in range(20):
  if (a-1)*i+1 >= b:
    break
    
print(i)

Solution (Python):
P = [int(_) for _ in input().split()]
A = P[0]
B = P[1]

T = 1
N = 0

while T < B:
    N += 1
    T += A - 1

print(N)

Solution (Python):
a,b=map(int,input().split())
h=1
ans=0
while h<b:
    h-=1
    h+=a
    ans+=1
print(ans)

Solution (Python):



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


ans = 0
plug = 1
while True:
    if plug >= B:
        break
    plug += A - 1
    ans += 1


print(ans)

Solution (Python):
a, b = map(int, input().split())
ans = 0
tmp = 0

if b == 1:
    print(0)
    exit()
    

for i in range(10 ** 9):
    ans += 1
    tmp += a
    if b <= tmp:
        break
    else:
        tmp -= 1
print(ans)

Solution (Python):
def solve():
    a, b = read()
    result = think(a, b)
    write(result)


def read():
    return read_int(2)


def read_int(n):
    return list(map(lambda x: int(x), read_line().split(' ')))[:n]


def read_float(n):
    return list(map(lambda x: float(x), read_line().split(' ')))[:n]


def read_line(n=0):
    if n == 0:
        return input().rstrip()
    else:
        return input().rstrip()[:n]


def think(a, b):
    if b == 1:
        return 0
    accum = [a + (a - 1) * r for r in range(100)]
    for i in range(len(accum)):
        if accum[i] >= b:
            return i + 1


def write(result):
    print(result)

if __name__ == '__main__':
    solve()

Solution (Python):
from copy import deepcopy
from math import ceil
if __name__ == "__main__":

    a = list(map(int, input().split()))
    n = deepcopy(a[0])
    i = 1
    if a[0] == a[1]: print(i)
    elif a[1] == 1: print(0)
    elif a[0] >= a[1]: print(i)
    else:
        while True:
            i += 1
            n += a[0] - 1
            if n >= a[1]:
                print(i)
                break

Solution (Python):
import sys
A,B = map(int, input().split())
akikuti =A
ans =1

if(B ==1):
    ans = 0
    print(ans)
elif (akikuti >= B ):
    print(ans)
    
else:
    
    for i in range(1000):
        akikuti += A-1
        ans +=1
        if(akikuti >=B):
            print(ans)
            sys.exit()
        else:
            continue

Solution (Python):
a, b = map(int, input().split())

tmp = 0

while a * tmp - tmp + 1 < b:
  tmp += 1

print(tmp)

Solution (Python):
a,b = [int(x) for x in input().split()]
def extend(x,a,b,n):
  assert x>=1
  if x >= b:
    return n
  else:
    n += 1
    extended =  x - 1 + a
    return extend(extended, a, b, n)
print(extend(1, a, b, 0))

Solution (Python):
a,b = map(int,input().split())
c =1

if b==1:
	c =0
else:
	while 1+(a-1)*c<b:
		c=c+1


print(c)

Solution (Python):
A,B = [int(x) for x in input().split()]
if(B==1):
    print(0)
elif(B<A):
    print(1)
else:
    if((B-A)%(A-1)==0):
        print((B-A)//(A-1)+1)
    else:
        print((B-A)//(A-1)+2)

Solution (Python):
a, b = (int(_) for _ in input().split())
total = 1
ans = 0
while total < b:
  total -= 1
  total += a
  ans += 1    
print(ans)

Solution (Python):
a,b=map(int,input().split())
for i in range(1000000):
  if a*i-i+1>=b:
    print(i)
    exit()

Solution (Python):
a, b = map(int, input().split())

if b == 1:
    print(0)
    exit()

cnt = 0
while b > 0:
    if cnt == 0:
        b -= a
    else:
        b -= a - 1
    cnt += 1

print(cnt)

Solution (Python):
import sys
input = sys.stdin.readline

a,b = map(int, input().split())
cur = 1
ans = 0
while (cur < b):
	cur += a-1
	ans += 1
print(ans)

Solution (Python):
import sys
a, b, result, tap = 0, 0, 0, 0
a, b = map(int, input().split())

if b == 1:
  print(0)
  exit()

while True:
  result += a
  if result >= b:
    tap += 1
    break
  else:
    result -= 1
    tap += 1
print(str(tap))

Solution (Python):
a, b = map(int, input().split())
ans = 0
tmp = 0

if b == 1:
    print(0)
    exit()

for i in range(10 ** 9):
    ans += 1
    tmp += a
    if b <= tmp:
        break
    else:
        tmp -= 1
print(ans)

Solution (Python):
A, B = map(int, input().split())
out = 1
cnt = 0
while out < B:
    out += A-1
    cnt += 1
print(cnt)

Solution (Python):


a,b = map(int,input().split())

c = a-1
cnt=0
while True:
    if b>1:
        b-=c
        cnt+=1
    else:
        break
print(cnt)

Solution (Python):
import math
a,b = map(int, input().split())
print(math.ceil((b-1) / (a-1)))

Solution (Python):
import math
A, B = list(map(int, input().split()))
print(math.ceil((B-1)/(A-1)))