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):
c = input()
c = tuple(map(int, c.split()))
a, b = c
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())
i = 0
while (A - 1) * i + 1 < B:
    i += 1
print(i)

Solution (Python):
a, b = list(map(int, input().split()))
t = 1
s = a

while True:
    if b == 1:
        t = 0
        break
    else:
        if b <= s:
            break
        else:
            s = s + a - 1
            t = t + 1

print(t)

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

tap = 1
ans = 0
while tap < b:
    tap += a - 1
    ans += 1

print(ans)

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

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())

if B == 1:
    print(0)
else:
    C = A
    cnt = 1
    while C < B:
        C += A - 1
        cnt += 1
    print(cnt)

Solution (Python):
import math

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

c = 1

ans = 0
while True:
    if c >= b:
        break
    c += a - 1
    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())

ans = 0
A = 1
while A < b:
  ans += 1
  A += (a - 1)
print(ans)

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

Solution (Python):




import sys
from io import StringIO
import unittest

def yn(b):
    print("Yes" if b==1 else "No")
    return

def resolve():
    readline=sys.stdin.readline

    a,b=map(int, readline().rstrip().split())
    
    
    
    
    n=1
    tap=0

    if b==1:
        print(0)
        return

    while 1:
        n-=1
        n+=a
        tap+=1
        if n>=b:
            print(tap)
            break


    return

if 'doTest' not in globals():
    resolve()
    sys.exit()

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

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

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

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

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

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

ans = 0
s  = 1
while s < b:
  ans += 1
  s += (a - 1)
print(ans)

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

Solution (Python):
import math
A,B = map(int,input().split())
tmp = B - A
ans =  math.ceil(tmp / (A-1))
if tmp == 0:
	print(1)
else:
	print(ans+1)

Solution (Python):

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


ans = 0

i = 1


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

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-A)/(A-1)+1))

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

while T<B:
    i+=1
    T=A*i - (i-1)
print(i)

Solution (Python):
import sys, heapq
def LI(): return list(map(int, sys.stdin.readline().split()))
def LS(): return list(sys.stdin.readline())

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

res = 0
tmp = 1
while tmp < B:
    res += 1
    tmp = tmp - 1 + A

print(res)

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

cont=1
cnt=0
while cont<B:
    cont+=A-1
    cnt+=1

print(cnt)

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

while out < B:
  out += A-1
  ans += 1

print(ans)

Solution (Python):
import sys

input = sys.stdin.readline

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

if __name__ == '__main__':
    main()

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

Solution (Python):
import math

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

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

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

cnt = 1
n = A
while n < B:
  cnt += 1
  n += A-1
print(cnt)

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

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

res = 1
cnt = 0

while  res < b:
    res += a-1
    cnt+=1
    
print(cnt)

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


resolve()

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

ans = 0
s = 1
while s < b:
  ans += 1
  s += a - 1
print(ans)

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())
x = a-1
y = b-1
if y%x==0:
    print(y//x)
else:
    print(y//x+1)

Solution (Python):
from sys import stdin
import math

if __name__ == "__main__":
  A, B = [int(i) for i in input().split()]
  
  print(math.ceil((B-1)/(A-1)))

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

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

tmp = 1
ans = 0

while tmp < B:
    tmp += (A-1)
    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())
ans = 1
cnt = 0
while ans < b:
  ans += a - 1
  cnt += 1
print(cnt)

Solution (Python):
def main():
    A, B = (int(x) for x in input().split())
    ans = 1
    count = 0
    while ans < B:
        ans = ans - 1 + A
        count += 1
    print(count)


if __name__ == "__main__":
    main()

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

ans = 0
for i in range(20):
    if 1 + (A - 1) * i >= B:
        ans = i
        break
print(ans)

Solution (Python):
import math

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

Solution (Python):
a,b = map(int,input().split())
if b == 1:
    print(0)
elif a >= b:
    print(1)
else:
    dum = b - a
    ans = 1
    syo,amari = divmod(dum,a-1)
    if amari != 0:
        ans += 1
    ans = ans + syo
    print(ans)

Solution (Python):
import math
A,B  = list(map(int,input().split()))
ans  = 1
c = 0
if B ==1:
    print("0")
elif B <= A:
    print("1")
else:
    while ans < B:
        ans += A-1
        c += 1
    print(c)

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

Solution (Python):

a, b = map(int, input().split())
counter = 0
kuchi = 1

while not (kuchi >= b):
    counter = counter + 1
    kuchi = (kuchi -1) + a

print (counter)

Solution (Python):
a, b = map(int, input().split())
total = 1
cnt = 0
while True:
    if total >= b:
        print(cnt)
        quit()
    total += a-1
    cnt += 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())
current = 1
nums = 0

while True:
  if b <= current:
    print(nums)
    exit(0)
  current += (a - 1)
  nums += 1

Solution (Python):

import math
A, B = map(int, input().split())
if B == 1:
    print(0)
elif B - A > 0:
    num = 1
    B = B - A
    print(num + math.ceil(B/(A-1)))
else:
    print(1)

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

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()) 

outlet = 1
cnt = 0
while outlet < b:
  outlet += a-1
  cnt += 1
  
print(cnt)

Solution (Python):



import math

def calc_num_of_sockets(plug, tap):
    return math.ceil((tap-1)/(plug-1))

def main():
    plug, tap = map(int, input().split())
    print(calc_num_of_sockets(plug, tap))

if __name__ == "__main__":
    try:
        assert calc_num_of_sockets(4, 10) == 3
        assert calc_num_of_sockets(8, 9) == 2
        assert calc_num_of_sockets(8, 8) == 1
    except:
        import traceback
        traceback.print_exc()
        exit()
    main()

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

if b==1:
  print(0)
else:
  t = a
  ans = 1
  for i in range(20):
    if t>=b:
      print(ans)
      break
    ans+=1
    t += 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())
ans = 0
if B == 1:
    print(0)
    exit(0)
while True:
    if A*(ans+1) - ans == B:
        print(ans + 1)
        exit(0)
    elif A*ans + A - ans > B:
        print(ans + 1)
        exit(0)
    ans += 1

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

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

Solution (Python):

def main():
    A,B = map(int, input().split())
    aki = 1
    cnt = 0

    while aki < B:
        aki -=1
        aki += A
        cnt += 1

    print(cnt)


if __name__ == '__main__':
    main()

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

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

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

if (B-1)%(A-1)==0:
    print((B-1)//(A-1))
else:
    print((B-1)//(A-1)+1)

Solution (Python):
n,k=map(int,input().split()) ; i=0
for q in range(1,364187,n-1):
    if q>=k:
        print(i)
        exit()
    i+=1

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

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

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

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

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

if B==1:
  print(0)
else:
  if math.ceil(B/A)==1:
    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=map(int,input().split())
s=(b-1)//(a-1)
print(s if s==(b-1)/(a-1) else s+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 = (b + a - 3) // (a - 1)
print(ans)

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

ans = 0
k = 1
while k < B:
    ans += 1
    k = (k - 1) + A

print(ans)

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

ans = 0
cnt = 1

while cnt < b:
    cnt += a - 1
    ans += 1

print(ans)

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

ans = 0
X = 1

while X < B:
    X += A-1
    ans += 1

print(ans)

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

Solution (Python):
import sys
import math


def solve():
    a, b = map(int, input().split())
    ans = 0
    if b == 1:
        print(0)
        sys.exit(0)
    ans = math.ceil((b-1)/(a-1))
    print(ans)


solve()

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

Solution (Python):
import sys
x, y = map(int, input().split())
tap = 1
ans = 0
while True:
  if tap >= y:
    break
  tap += x-1
  ans += 1
print(ans)

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

Solution (Python):
import math



def main(a, b):
    if a == b:
        return 1
    n = math.ceil((b - 1) / (a - 1))
    return n

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

Solution (Python):
def II(): return int(input())
def MI(): return map(int,input().split())
def LMI(): return list(map(int,input().split()))
def LIIN(n): return list(int(input()) for _ in range(n))
def LMIN(n): return [list(map(int, input().split())) for _ in range(n)]
def IS(): return input()
def MS(): return map(str,input().split())
def LMS(): return list(map(str,input().split()))
def LISN(n): return list(input() for _ in range(n))
def LMSN(n): return [input().split() for _ in range(n)]
MOD = 10**9+7
INF = 10**18

def main():
    a,b = MI()
    print(1+(b-a+(a-1)-1)//(a-1))

if __name__ == '__main__':
    main()

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

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

else:
  print(int(c)+1)

Solution (Python):

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

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

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

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

Solution (Python):
args = input().split()
a,b = int(args[0]),int(args[1])
if b==1:
  print("0")
elif b<=a:
  print("1")
else:
  print(int((b-a)/(a-1))+1+((b-a)%(a-1)!=0))

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

ans = 0
num = 1
while num < b:
    num += a - 1
    ans += 1

print(ans)

Solution (Python):
x,y = map(int,input().split())
n = 0
while n*x - (n-1) < y:
    n += 1
print(n)

Solution (Python):
import math

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

x = (B-1)/(A-1)

print(math.ceil(x))

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

sum = a
cnt = 1
while (sum < b):
    sum += a - 1
    cnt += 1
if b == 1:
    print(0)
else:
    print(cnt)

Solution (Python):


def main():
    A, B = map(int, open(0).read().split())

    N = -(-(B - A) // (A - 1)) +1
    print(N)


main()

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

num = 1
count = 0

while num < B:
    num += A - 1 
    count += 1

print(count)

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())

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

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

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

aki = a - 1
n = 0
while aki * n < b - 1:
    n += 1

print(n)

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

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

tmp = 1
ans = 0
while tmp < i[1]:
    ans+=1
    tmp+=i[0]-1
print(ans)

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

x = math.ceil(1+(B-A)/(A-1))

print(x)

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

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

Solution (Python):
[a,b] = [int(i) for i in input().split()]
now = 1
cnt = 0
while(now < b):
    now += a-1
    cnt += 1
print(cnt)

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

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


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

if b == 1:
	print(0)
else:
	sockets = a
	ans = 1
	
	while sockets < b:
		sockets += a- 1
		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())
if b==1:
    print(0)
elif a>=b:
    print(1)
else:
    for i in range(1,20):
        if (a-1)*i+a>=b:
            print(i+1)
            exit()
    print(i+1)

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

ans = 0
cnt = 1
while cnt < b:
  cnt += a-1
  ans += 1
  
print(ans)

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

n = 0
b = 1
while b < B:
    n += 1 
    b += A-1
print(n)

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

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

i = 0
while True:
  if a + (i-1)*(a-1) >= b:
    ans = i
    break
  i += 1

print(ans)

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

while (n*a -(n-1) < b):
  n += 1
  
print(n)

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

cnt = 0
s = 1
while B > s:
  cnt += 1
  s += A - 1
print(cnt)

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

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

for x in range(B):
  if A+(A-1)*x < B:
    cnt+=1
  else:
    break
    
print(cnt+1)

Solution (Python):
import sys
a,b = map(int,input().split())
c = 2
if b == 1:
    print(0)
    sys.exit()
if a >= b:
    print(1)
    sys.exit()
R = False
x = 2*a - 1
while R == False:
    if x >= b:
        R = True
    else:
        x += a-1
        c += 1
print(c)

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

Solution (Python):
A,B=(int(x) for x in input().split())
i=0
while i*(A-1)<B-1:
  i+=1
print(i)

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

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

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

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

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

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

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

    while C < B:
        C -= 1
        C += A
        ans += 1

    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd 
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) 


a, b = map(int, input().split())
ans = 0
cnt = 1
while True:
    if cnt >= b:
        print(ans)
        sys.exit()
    cnt = cnt + a - 1
    ans += 1

Solution (Python):
A, B = tuple(map(int, input().split()))
i = 0
while True:
    if A * i - (i - 1) >= B:
        print(i)
        break
    else:
        i += 1

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

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

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

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

print(1+math.ceil((B-A)/(A-1)))

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

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

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

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

Solution (Python):

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

ans = 0
soc = 1

while soc < B:
  soc -= 1
  ans += 1
  soc += A

print(ans)

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

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def main():
    A, B = map(int, read().split())
    print(-(-(B-1) // (A-1)))
    return

if __name__ == '__main__':
    main()

Solution (Python):
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import numpy as np

def main():
    A, B = map(int, read().split())
    print(-(-(B-1) // (A-1)))
    return

if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
A, B = map(int, input().split())
if B == 1:
    print(0)
    exit()
    
ans = 1
B -= A

while True:
    if B <= 0:
        print(ans)
        exit()
    B -= (A-1)
    ans += 1

Solution (Python):
import sys
a, b = map(int, sys.stdin.readline().split())
print(-((a-b) // (a-1)) + 1)

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

Solution (Python):
args = input().split()
a = int(args[0])
b = int(args[1])
 
tap = 0
socket = 1
while socket < b:
  socket -= 1
  tap += 1
  socket += a
  
print(tap)

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

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

n = 0
while (a*n-(n-1)) < b:
  n+=1
print(n)