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):
N,K = map(int,input().split())
c = N
ans = 1
if K == 1:
    print(0)
else:
    while c < K:
        ans += 1
        c += N-1
    print(ans)

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

Solution (Python):
import sys
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 10 ** 9 + 7
import math
a, b = LI()






kuchi = 1
ans = 0

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

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=map(int,input().split())

print(math.ceil((b-a)/(a-1))+1)

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

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

Solution (Python):
from sys import stdin
nii=lambda:map(int,stdin.readline().split())
lnii=lambda:list(map(int,stdin.readline().split()))

a,b=nii()

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

print(ans)

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

print(n)

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):
A,B = map(int,input().split())
if B == 1:
    print(0)
elif B <= A:
    print(1)
else:
    ans = 1+int((B-A)/(A-1))
    if (B-A)%(A-1):
        ans += 1
    print(ans)

Solution (Python):
import sys
def MI(): return map(int,sys.stdin.readline().rstrip().split())


A,B = MI()
print((B+A-3)//(A-1))

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

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

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

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

cnt = 0
plug = 1

if b > 1:
    while plug < b:
        plug = plug - 1 + a
        cnt += 1

print(cnt)

Solution (Python):
import sys

A, B = map(int, sys.stdin.readline().split())
print((B - A - 1) // (A-1) + 2)

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
while ans*(A-1)+1<B:
    ans+=1
print(ans)

Solution (Python):
import sys

sys.setrecursionlimit(10**7)
def I(): return int(sys.stdin.readline().rstrip())
def MI(): return map(int,sys.stdin.readline().rstrip().split())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))  
def LI2(): return list(map(int,sys.stdin.readline().rstrip()))  
def S(): return sys.stdin.readline().rstrip()
def LS(): return list(sys.stdin.readline().rstrip().split())  
def LS2(): return list(sys.stdin.readline().rstrip())  


A,B = MI()

print((B+A-3)//(A-1))

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

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

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

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

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

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

print(ans)

Solution (Python):
def main():
    
    n, k = map(int, input().split())
    
    

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


if __name__ == '__main__':
    main()

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

g = a - 1
d, r = divmod(b - 1, g)
if r == 0:
    print(d)
else:
    print(d + 1)

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

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

Solution (Python):
A,B=map(int,input().split())
print((B-2)//(A-1)+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(' '))
print((B + A - 3) // (A - 1))

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

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

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

print(tap)

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

Solution (Python):

import sys


def solve(A: int, B: int):
    if B == 1:
        print(0)
        return
    t = A
    ans = 1
    while True:
        if t >= B:
            print(ans)
            break
        t += A-1
        ans += 1
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)

if __name__ == '__main__':
    main()

Solution (Python):

import sys


def solve(A: int, B: int):
    t = 1
    ans = 0
    while True:
        if t >= B:
            print(ans)
            break
        t += A-1
        ans += 1
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)

if __name__ == '__main__':
    main()

Solution (Python):

import sys


def solve(A: int, B: int):
    p = 1
    ans = 0
    while True:
        if p >= B:
            print(ans)
            break
        p -= 1
        p += A
        ans += 1
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)

if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
a,b=map(int,input().split())
if b==1: print(0); exit();
for i in range(1,1000):
  if b<=a*i-(i-1):
    print(i)
    exit(0)

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

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

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

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

Solution (Python):
A, B = map(int, input().split())
count = 1
ans = 0
if B == 1:
  print(0)
  exit()
for i in range(100):
  ans += 1
  count += A - 1
  if count >= B:
    break
print(ans)

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

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

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



a = 0
num = 1
while num < B:
  num -= 1
  num += A
  a += 1

print(a)

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

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):
A, B = map(int, input().split())

N = 0
sum = 1

while (sum < B):
     N += 1
     sum = A + (A-1)*(N-1)

     if sum >= B:
         break

ans = N

print(ans)

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

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

Solution (Python):


def main():
    a, b = map(int, input().split())
    quo = (b - 1) // (a - 1)
    rem = (b - 1) % (a - 1)
    if rem == 0:
        print(quo)
    else:
        print(quo+1)

if __name__ == "__main__":
    main()

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):
a, b = (int(i) for i in input().split())
count = 0
if b == 1:
    print("0")
    exit()
while True:
    b -= a
    count += 1
    if b <= 0: break
    b += 1
print(count)

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

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

Solution (Python):
a,b=map(int, input().split())
import math
ans=math.ceil((b-a)/(a-1)+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())

if b == 1:
    print(0)
elif a == b:
    print(1)
else:
    print(math.ceil((b-a)/(a-1)+1))

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

Solution (Python):
import sys
d = list(map(int,input().split()))
A = d[0]
B = d[1]
cnt = 0
while True:
    
    
    if A*cnt - cnt +1 >= B:
        print(cnt)
        sys.exit(0)
    cnt +=1

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

print(x)

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

Solution (Python):
A,B = map(int, input().split())
for i in range(10**10 + 1):
  C = 1 + (A-1) * i
  if B <= C:
    print(i)
    break

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

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

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

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

Solution (Python):

import sys
input=sys.stdin.readline

def main():
    a,b = map(int,input().split())
    plug=1
    ans=0

    while True:
        if plug >= b:
            break
        plug+=a-1
        ans+=1

    print(ans)

if __name__=="__main__":
    main()

Solution (Python):

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

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

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

if b == 1:
    print(0)
elif b <= a:
    print(1)
else:
    print((b - 2)//(a - 1) +1)

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

ans = 0
for n in range(0, 20):
    if A * n - (n - 1) >= B:
        ans = n
        break

print(ans)

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

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

Solution (Python):

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

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

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

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

Solution (Python):
ma = lambda :map(int,input().split())
lma = lambda :list(map(int,input().split()))
tma = lambda :tuple(map(int,input().split()))
ni = lambda:int(input())
yn = lambda fl:print("Yes") if fl else print("No")
import collections
import math
import itertools
import heapq as hq
a,b = ma()
cnt=1
ans=0
while cnt<b:
    cnt=cnt-1 +a
    ans+=1
print(ans)

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())
s = 1
i = 0
while s < b:
  s = s + a - 1
  i += 1
print(i)

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

if b == 1:
    print(0)

else:
    ans = 0
    y = 0
    while y < b:
        ans+=1
        y = ans*(a-1)+1
    print(ans)

Solution (Python):
def resolve():
    A, B = [int(x) for x in input().split(" ")]
    n = 0
    t = 1
    while t < B:
        t -= 1
        t += A
        n += 1
    print(n)
resolve()

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

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

print(ans)

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

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

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

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

Solution (Python):
a = list(map(int,input().split()))
c = 1
ans = 0
if a[1] == 1:
  print(0)
else:
  while a[1] > c:
    c += (a[0]-1)
    ans += 1
  print(ans)

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

for i in range(1,10000):
    ans+=1
    if A+A*i-i>=B:
        print(ans)
        exit()

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

Solution (Python):
r=input().split()
A=int(r[0])
B=int(r[1])
x=1
n=0
while x<B:
    x+=A-1
    n+=1
print(n)

Solution (Python):
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    A, B = map(int, readline().split())

    cur = 1
    ans = 0
    while cur < B:
        cur += A - 1
        ans += 1

    print(ans)


if __name__ == '__main__':
    main()

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

slot = 1
tap = 0
while slot < B:
    slot += A-1
    tap += 1
print(tap)

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

Solution (Python):
import math as m

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

Solution (Python):


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

Solution (Python):
"""
A:プラグの数
B:必要なプラグの数
"""

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

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

    print(count)

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

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

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

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

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

print(ans)

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

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

if  b==1:
    print(0)
elif a >= b:
    print(1)
else:
    SumPowerSocket = a
    NumUsePowerTap = 1
    while True:
        if b > SumPowerSocket:
            SumPowerSocket += a - 1
            NumUsePowerTap += 1
        else:
            print(NumUsePowerTap)
            break

Solution (Python):

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

if  b==1:
    print(0)
elif a >= b:
    print(1)
else:
    SumPowerSocket = a
    NumUsePowerTap = 1
    while True:
        if b > SumPowerSocket:
            SumPowerSocket += a - 1
            NumUsePowerTap += 1
        else:
            print(NumUsePowerTap)
            break

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

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

Solution (Python):
import sys
from math import ceil


def main():
    input = sys.stdin.buffer.readline
    a, b = map(int, input().split())
    print(ceil((b - 1) / (a - 1)))


if __name__ == "__main__":
    main()

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

Solution (Python):
a = input("").split(" ")
a = [int(b) for b in a]
A = a[0]
B = a[1]
n = 1
ans = 0
while n < B:
    ans += 1
    n += A-1
print(ans)

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

if b == 1:
    print('0')
elif b <= a :
    print('1')
else:
    b -= a
    a -= 1
    y = b % a
    if y==0:
        print(1 + b//a)
    else:
        print(2 + b//a)

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

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

print(-((1-B)//(A-1)))

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

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

print(cnt-1)

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

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

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

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

ans=0
res=1
while res<b:
  res=res+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())
tup = A
i = 1
if B==1:
  print('0')
else:
  while tup < B:
    tup = tup - 1 + A
    i += 1

  print(i)

Solution (Python):
A, B = map(int, input().split())
tup = A
i = 1
if B==1:
  print('0')
else:
  while tup < B:
    tup = tup - 1 + A
    i += 1

  print(i)

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

if b==1:
    ans=0
    
else:
    ans=int((b-2)/(a-1))+1

print(ans)

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

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

Solution (Python):
def main():
    a, b = map(int, input().split())
    cnt = 1
    ans = 0

    while True:
        if cnt >= b:
            break
        cnt += a - 1
        ans += 1

    print(ans)


if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
from sys import stdin
from math import ceil
a, b = [int(x) for x in stdin.readline().rstrip().split()]

n = ceil((b-1)/(a-1))
print(n)

Solution (Python):
import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext

def i_input(): return int(input())
def i_map(): return map(int, input().split())
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    a, b = i_list()
    if b == 1:
        print(0)
    else:
        i = 1
        while (a + (a - 1) * (i - 1) < b):
            i += 1
        print(i)
        

if __name__ == '__main__':
    main()

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

c = (b - 1)/(a - 1)
add = 1 - (c == int(c))
c = int(c) + add

print(c)

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

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

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

ans = a
cnt = 1
for i in range(50):
    if ans >= b:
        print(cnt)
        exit()
    ans += a -1
    cnt += 1

Solution (Python):
import sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = 10**20
def I(): return int(input())
def F(): return float(input())
def S(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()

def resolve():
    A, B = LI()

    ans = (B - 2) // (A - 1) + 1
    print(ans)

if __name__ == '__main__':
    resolve()

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

Solution (Python):
import sys
input = lambda : sys.stdin.readline().rstrip()
sys.setrecursionlimit(max(1000, 10**9))
write = lambda x: sys.stdout.write(x+"\n")


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

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

count = 0
total = 1

if total >= b:
    print(count)
else:
    total = a
    count = 1
    if total >= b:
        print(count)
        exit()
    while True:
        total += (a-1)
        count += 1
        if total >= b:
            print(count)
            break

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())
print(1+(b-2)//(a-1))

Solution (Python):
import math

A, B = [int(i) for i in input().split()]

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

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

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

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

outlet = 1
answer = 0

while(outlet < b):
    outlet -= 1
    outlet += a
    answer += 1

print(answer)

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())
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())
if B == 1:
    answer = 0
elif B<=A:
    answer = 1
else:
    tap = 2
    while True:
        if tap*A-tap+1 >= B:
            answer = tap
            break
        else:
            tap += 1
print(answer)

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

port = 1
plug = 0
while port < B:
    port += A - 1
    plug += 1

print(plug)

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

Solution (Python):
import math
a, b = map(int, input().split())
n = 1
ans = 0
while n<b:
    for i in range(1, n+1):
        n += a-1
        ans += 1
        if n>=b:
            break
print(ans)

Solution (Python):

import math
a, b = map(int, input().split())
ans = 1
now_consent = a
plusplug = a - 1
if b == 1:
  print(0)
elif a >= b:
    print(1)
elif a < b:
    other = b - a
    ans += math.ceil(other / plusplug)
    print(ans)

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

Solution (Python):


A, B = input().split()


A = int(A)
B = int(B)


num = 1


if B == 1:
    num = 0
else:
    while (A - 1) * (num - 1) + A < B:
        num = num + 1


print(num)

Solution (Python):

A, B = input().split()


A = int(A)
B = int(B)


num = 1


if B == 1:
    num = 0
else:
    while (A - 1) * (num - 1) + A < B:
        num = num + 1


print(num)

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

if b == 1:
  print("0")
else:
  while cnt1 < b:
    cnt1 += (a-1)
    cnt2 += 1
  print(cnt2)

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

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

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

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

Solution (Python):
a,b=input().split()
a=int(a)
b=int(b)
i=0
sum=0
if b==1:
    print(0)
else:
    while True:
        if i==0:
            b=b-a
            sum+=1
            i+=1
        elif b<=0:
            print(sum)
            break
        else:
            b=b-a+1
            sum+=1
            i+=1

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

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

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

Solution (Python):
a, b = map(int, input().split())
tap = 1
x = 0
while True:
    if tap < b:
        x += 1
        tap += (a - 1)
    else:
        print(x)
        exit()

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 sys
def input(): return sys.stdin.readline().strip()
def mapint(): return map(int, input().split())
sys.setrecursionlimit(10**9)

A, B = mapint()
print(-(-(B-1)//(A-1)))

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

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

if b==1:
  print(0)
if b>1:
  x=a
  ans=1
  while x<b:
    ans+=1
    x+=a-1
  print(ans)

Solution (Python):
from math import ceil

inputs = input()
a = int(inputs.split(" ")[0])
b = int(inputs.split(" ")[1])
print(ceil((b - 1) / (a - 1)))

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

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

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

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

Solution (Python):
import sys, bisect, math, itertools, string, queue, copy







mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

a, b = inpm()
tmp = a
if(b == 1):
    print(0)
else:
    ans = 1
    while(b > tmp):
        tmp += a - 1
        ans += 1
    print(ans)

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

Solution (Python):

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

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

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

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

ans=[]

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

else:
  for i in range(20):
    if b<=a+(a-1)*i:
      ans.append(i+1)
  print(min(ans))

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

Solution (Python):
A, B = [int(x) for x in input().split()]
ans = -(-(B-1)//(A-1))
print(ans)

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

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

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

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

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

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):
a, b = map(int, input().split())
inc=1
ans=0
while inc<b:
  inc+=a-1
  ans+=1
  
print(ans)

Solution (Python):
a,b=map(int, input().split())
c="必要な電源タップ数は"
d="個です。"
count=0
total=1
while True:
    

    





    if total >= b:
        break
    total += (a-1)
    count+=1
print(count)

Solution (Python):
import math

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

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