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

import sys







"""Template"""


class IP:
    """
    入力を取得するクラス
    """

    def __init__(self):
        self.input = sys.stdin.readline

    def I(self):
        """
        1文字の取得に使います
        :return: int
        """
        return int(self.input())

    def S(self):
        """
        1文字の取得(str
        :return: str
        """
        return self.input()

    def IL(self):
        """
        1行を空白で区切りリストにします(int
        :return: リスト
        """
        return list(map(int, self.input().split()))

    def SL(self):
        """
        1行の文字列を空白区切りでリストにします
        :return: リスト
        """
        return list(map(str, self.input().split()))

    def ILS(self, n):
        """
        1列丸々取得します(int
        :param n: 行数
        :return: リスト
        """
        return [int(self.input()) for _ in range(n)]

    def SLS(self, n):
        """
        1列丸々取得します（str
        :param n: 行数
        :return: リスト
        """
        return [self.input() for _ in range(n)]

    def SILS(self, n):
        """
        Some Int LineS
        横に複数、縦にも複数
        :param n: 行数
        :return: list
        """
        return [self.IL() for _ in range(n)]

    def SSLS(self, n):
        """
        Some String LineS
        :param n: 行数
        :return: list
        """
        return [self.SL() for _ in range(n)]


class Idea:
    def __init__(self):
        pass

    def HF(self, p):
        """
        Half enumeration
        半分全列挙です
        pの要素の和の組み合わせを作ります。
        ソート、重複削除行います
        :param p: list : 元となるリスト
        :return: list : 組み合わせられた和のリスト
        """
        return sorted(set(p[i] + p[j] for i in range(len(p)) for j in range(i, len(p))))

    def Bfs2(self, a):
        """
        bit_full_search2
        bit全探索の改良版
        全探索させたら2進数のリストと10進数のリストを返す
        :return: list２つ : １個目 2進数(16桁)  2個目 10進数
        """
        
        
        
        value = []
        for i in range(1 << len(a)):
            output = []

            for j in range(len(a)):
                if self.bit_o(i, j):
                    """右からj+1番目のiが1かどうか判定"""
                    
                    output.append(a[j])
            value.append([format(i, 'b').zfill(16), sum(output)])

        value.sort(key=lambda x: x[1])
        bin = [value[k][0] for k in range(len(value))]
        val = [value[k][1] for k in range(len(value))]
        return bin, val

    def S(self, s, r=0, m=-1):
        """
        ソート関係行います。色々な設定あります。
        :param s: 元となるリスト
        :param r: reversするかどうか 0=False 1=True
        :param m: （2次元配列）何番目のインデックスのソートなのか
        :return: None
        """
        r = bool(r)
        if m == -1:
            s.sort(reverse=r)
        else:
            s.sort(reverse=r, key=lambda x: x[m])

    def bit_n(self, a, b):
        """
        bit探索で使います。0以上のときにTrue出します
        自然数だからn
        :param a: int
        :param b: int
        :return: bool
        """
        return bool((a >> b & 1) > 0)

    def bit_o(self, a, b):
        """
        bit探索で使います。1のときにTrue出すよ
        oneで1
        :param a: int
        :param b: int
        :return: bool
        """
        return bool(((a >> b) & 1) == 1)

    def ceil(self, x, y):
        """
        Round up
        小数点切り上げ割り算
        :param x: int
        :param y: int
        :return: int
        """
        return -(-x // y)

    def ave(self, a):
        """
        平均を求めます
        :param a: list
        :return: int
        """
        return sum(a) / len(a)

    def gcd(self, x, y):
        if y == 0:
            return x
        else:
            return self.gcd(y, x % y)

    def lcm(self, x, y):
        return (x * y) // self.gcd(x, y)


"""ここからメインコード"""


def main():
    
    r, e = range, enumerate
    ip = IP()
    id = Idea()

    """この下から書いてね"""
    a, b = ip.IL()
    count = 0
    ans = 0
    if b == 1:
        print(0)
    else:
        while count < b:
            
            if count == 0:
                count += a
            else:
                count += a-1
            ans += 1
        print(ans)



main()

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

Solution (Python):
import sys
sys.setrecursionlimit(int(1e6))

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



a = A-1
b = B-1
ans = b//a + bool(b%a)
print(ans)

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

print(ans)

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

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

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

Solution (Python):
from math import ceil

s, t = map(int, input().split())
a = t-s
print(1+ceil(a/(s-1)))

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

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

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

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

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

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

print (result)

Solution (Python):
"""
https://atcoder.jp/contests/abc139/tasks/abc139_b
"""

import numpy as np


def calc(A: int, B: int) -> int:
    return int(np.ceil((B - 1) / (A - 1)))


def load_input_as_int_array() -> np.ndarray:
    return np.array([int(v) for v in input().split(" ")])


def main() -> None:
    A, B = load_input_as_int_array()
    result = calc(A, B)
    print(result)


main()

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

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

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

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

if b ==1:
    n =0

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

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

ans=1
c=a
if b==1:
    print(0)
    exit()
while c<b:
    c-=1
    c+=a
    ans+=1
print(ans)

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

Solution (Python):
import sys
inputs = sys.stdin.readlines()

A, B = map(int, inputs[0].split())
if B == 1:
  print(0)
else:
  ok = A
  use = 1
  while ok < B:
      use += 1
      ok += A-1

  print(use)

Solution (Python):
i = list(map(int, input().split()))
num = 1
count = 0
while (num < i[1]):
  num = num + i[0] -1
  count += 1
print(count)

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

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

if b == 1:
    print(0)

else:
    while all < b:
        ans += 1
        if ans > 0:
            all = a * ans - (ans - 1)
        else:
            all = a * ans

    print(ans)

Solution (Python):
input_ = input()
input_ = input_.split(' ')
a = int(input_[0])
b = int(input_[1])
cnt = 1
mouth = 0
for idx in range(20):
  if cnt >= b:
    break
  cnt += a -1
  mouth +=1
  
print(mouth)

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

Solution (Python):
import sys
import math
from fractions import gcd





def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""


 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())


 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""
a,b=  map(int, sys.stdin.readline().split())











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

Solution (Python):
(A, B) = tuple([int(s) for s in input().split(' ')])
if(B == 1):
    print(0)
else:
    x = A
    count = 1
    while(x < B):
        x += A - 1
        count += 1
    print(count)

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

    cnt = 1

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

    print(cnt)
        

main()

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):
inp = input() 
inp_lis = inp.split(" ")
A = int(inp_lis[0])
B = int(inp_lis[1])

add_times = 0
number_of_tap = 1

while number_of_tap < B:
    number_of_tap = number_of_tap + A - 1
    add_times = add_times + 1

print(add_times)

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

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

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

count = 0
while (b - (count*(a-1)+1)) > 0:
  count += 1
  
print(count)

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

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

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

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

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

Solution (Python):



import math
A, B = map(int, input().split())
if B==1:
    print(0)
else:
    count = 0
    while True:
        B -= A
        count += 1
        if B > 0:
            B += 1
        else:
            break
    print(count)

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

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

Solution (Python):
def main():

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

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

if __name__ == '__main__':
    main()

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

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

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

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

count=0
plug=1
while plug<B:
  count+=1
  plug+=A-1
print(count)

Solution (Python):
A, B = (int(i) for i in input().split())

if B == 1:
  print(0)
else:
  tap_num = 0
  available_socket_num = 0
  while B > available_socket_num:
    tap_num += 1
    available_socket_num = (A - 1) * tap_num + 1

  print(tap_num)

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

Solution (Python):
A, B = map(int, input().split())
now = 0
ans = 0
f = True
while now < B:
    if f:
        now += A
        ans += 1
        f = False
    else:
        now += A-1
        ans += 1

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

Solution (Python):
A = list(map(int,input().split()))
totalTap = 1
useTap = 0
while totalTap < A[1]:
  totalTap = totalTap + A[0] - 1
  useTap = useTap + 1
print(useTap)

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

A = get[0]
B = get[1]


count = 0
plug = 1

while plug < B:
  plug = plug - 1 + A
  count += 1
  
print(count)

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

ans = 1
tmp = a

if b <= 1:
    print(0)
    quit()

while True:
    if tmp >= b:
        print(ans)
        quit()
    else:
        tmp += (a - 1)
        ans += 1

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

count = 0
while (A-1) * count + 1 < B:
    count += 1
print(count)

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

Solution (Python):
i = list(map(int, input().split()))
if i[1] == 1:
    count = 0
else:
    a = i[0]
    count = 1
    
    while a < i[1]:
        a += i[0] - 1
        count += 1

print(count)

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


if B==1:
    n=0
else:
    n=1
    while True:
        if n*A-n+1>=B:
            break
        else:
            n+=1

print(n)

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

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

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

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

Solution (Python):
s = input().rstrip().split(' ')
A = int(s[0])
B = int(s[1])
 
sum = A
cnt = 1
flg = True
 
while flg:
  if B ==0 or B == 1:
    cnt = 0
    break
  if sum >= B:
    break
  sum += A -1
  cnt += 1
 
print(cnt)

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

m = 1
c = 0

while True:
	
	if B <= m:
		break
	
	m = m - 1 + A
	c += 1
		
print(c)

Solution (Python):
def acinput():
    return list(map(int, input().split(" ")))

a,b=acinput()

dp={}
dp[1]=a
dp[0]=1
for i in range(1,100):
    dp[i]=dp[i-1]+a-1

res=0
for i in range(0,100):
    if dp[i]>=b:
        res=i
        break
print(res)

Solution (Python):
from math import ceil

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

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

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

Solution (Python):
l = list(map(int, input().split()))
s = 0
i = 0
while s < l[1]:
  s = l[0]*i - i +1
  i += 1

print(i-1)

Solution (Python):
import math

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

N = math.ceil((B-1)/(A-1))
print(N)

Solution (Python):
from sys import stdin

a,b = list(map(int,stdin.readline().rstrip().split()))

i = 1

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

elif a >= b:
    print(1)
    exit()
else:
    while True:
        if i * (a-1)+1< b:
            i += 1
        else:
            print(i)
            break

Solution (Python):
a, b = [int(c) for c in input().split(' ')]
num = 0
bdash = b
if b == 1:
    num = 0
    bdash = -1
while bdash > 0:
    if bdash == a:
        num = num+1
        break
    elif bdash > a:
        num = num+1
        bdash = bdash - (a - 1)
    elif bdash < a:
        num = num + 1
        break
print(num)

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

tap = 1
ans = 0

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

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

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


dengen = 1


tappu = 0

while dengen < B:
  tappu += 1
  dengen = dengen  + A - 1
  
print(tappu)

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

Solution (Python):
a, b =[int(_) for _ in input().split()]
ans = 1
c = a
if b<=1:
    print(0)
    exit()
while 1:
    if c >=b:
        break
    ans+=1
    c += a-1
print(ans)

Solution (Python):
import numpy as np

a,b = input().split()
a = int(a)
b = int(b)
num_tap = int(0)

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

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

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

count = 1
tap = a
while True:
    if tap >= b and b != 1:
        print(count)
        break
    elif b == 1:
        print(0)
        break
    else:
        count += 1
        tap = a*count - (count - 1)

Solution (Python):

import sys
input = sys.stdin.readline

a=0
plug=1
num=list(map(int,input().split()))
while plug<num[1]:
    plug=plug-1+num[0]
    a=a+1

print(a)

Solution (Python):
import math

a, b = input().strip().split(' ')
a, b = [int(a), int(b)]

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

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

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

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

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

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

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

Solution (Python):
elc_tap = input().split(" ")
for i in range(2):
    elc_tap[i] = int(elc_tap[i])

count = 0
now_tap = 1
while elc_tap[1]>now_tap:
    now_tap += (elc_tap[0]-1)
    count += 1

    
print(count)

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

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

Solution (Python):


''' 
------------------------
author : iiou16
------------------------
'''
import math

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

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

if __name__ == '__main__':
    main()

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

Solution (Python):
a,b=(int(x) for x in input().split())
numa = 0
num = 1

while num < b:
    num = num - 1
    num = num + a
    numa = numa + 1

print(numa)

Solution (Python):
import math

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

if b!=1:
  num = math.ceil((b-1)/(a-1))
else:
  num = 0

print(num)

Solution (Python):


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







out = 1
count = 0
while out < B:
    out += (A-1)
    count += 1

print(count)

Solution (Python):
import math

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

mytarget = (B-A)

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

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

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

Solution (Python):
from sys import stdin


def main():
    A, B = [int(x) for x in stdin.readline().rstrip().split()]
    ans = A
    sum_ = 1

    while True:
        if B == 1:
            sum_ = 0
            break

        if ans >= B:
            break

        sum_ += 1

        ans = ans - 1 + A

    print(sum_)


if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
if __name__ =='__main__':
    a, b = list(map(int,input().split()))
    if b == 1:
        print(0)
    else :
        c = 1
        d = a
        while True:
            if d >= b:
                print(c)
                break
            else :
                d += a-1
                c+=1

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

Solution (Python):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**9)
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

a,b = na()

import math

print(math.ceil((b-1)/(a-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())
if (b-1)%(a-1)==0:
  c=(b-1)//(a-1)
else:
  c=(b-1)//(a-1)+1
print(c)

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

ans = 1
count = 0

while ans < B:
    ans += A - 1
    count += 1
print(count)

Solution (Python):

import sys


def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

A, B = ISI()
for i in range(1, 10000):
    if B == 1:
        print(0)
        break
    else:
        sum = A*i-(i-1)
        if sum >= B:
            print(i)
            break

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

ans = math.ceil((B-1) / (A -1))


print(ans)

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

ele = 1
ans = 0

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

print(ans)

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

c = 0
tmp = 1

while tmp < B:
    c += 1
    if c == 1:
        tmp = A
    else:
        tmp = (A - 1) * (c - 1) + A
    

print(c)

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

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

temp = B - A

if B == 1:
    print(0)
elif temp <= 0:
    print(1)
else:
    total = temp/(A-1)
    if temp%(A-1)==0:
        print(int(total)+1)
    else:
        print(int(total)+2)

Solution (Python):
import numpy as np
A,B=np.array(list(map(int, input().split())))

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

Solution (Python):
A, B = [int(x) for x in input().split()]
if B == 1:
  print(0)
  exit()
c = 1
a = A
while True:
  if a >= B:
    break
  else:
    a += A-1
    c += 1
print(c)

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

Solution (Python):
import sys
from math import ceil, floor

A_B = str(sys.stdin.readline()).strip().split()
A, B = int(A_B[0]), int(A_B[1])

def max_num_outlets(num_outlets_each, num_sockets):
    max_num_outlets = 1 + (num_outlets_each - 1) * num_sockets
    return max_num_outlets

for i in range(B):
    if B <= max_num_outlets(A, i):
        print(i)
        break

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

while total < B :
  total += add
  ans += 1
  
print(ans)

Solution (Python):
n1 = list(map(int, input().split()))
n2 = (n1[1] - 1)//(n1[0] - 1)
n3 = (n1[1] - 1)%(n1[0] - 1)
if n3 > 0:
    a1 = n2 + 1
else:
    a1 = n2
print(a1)

Solution (Python):
import math

a, b = map(int, input().split())
if b == 1:
    print(0)
else:
    res = math.ceil((b - 1) / (a - 1))
    print(res)

Solution (Python):


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

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



if __name__ == '__main__':
    main()

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

count = 0
    
while (A+(A-1)*(count-1))<B:
    count += 1
    
print(count)

Solution (Python):
import sys
import math
from fractions import gcd





def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""


 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())


 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

list_tap =  list(map(int, sys.stdin.readline().split()))

A = list_tap[0]
B = list_tap[1]

cnt = 1
cnt2 = 0

for i in range (20):
    if(cnt >= B):
        break
    cnt = cnt + A - 1
    cnt2 += 1
    
    

print(cnt2)

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

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

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

Solution (Python):
import sys
A, B = map(int, input().split())
h = 1
i = 1
if B == 1:
  print(0)
  sys.exit()
else:
  for _ in range(100):
    h += A - 1
    if h >= B:
      print(i)
      sys.exit()
    i += 1

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

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

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

count=0
C=1

for i in range(20):
    C=C-1
    C=C+A
    count+=1
    if B-C <= 0:
        break
if B==1:
    count=0

print(count)

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

Solution (Python):
kuchi, needed_kuchi_num= map(int,input().split())
if needed_kuchi_num != 1:
    socket_num = 1

    con_flg = 1
    available_kuchi_num = 0

    while con_flg == 1:
        available_kuchi_num = (kuchi - 1)*(socket_num - 1) + kuchi
        if needed_kuchi_num <= available_kuchi_num:
            con_flg = 0
        else:
            socket_num += 1
else:
    socket_num = 0

print(socket_num)

Solution (Python):
import sys

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

count= 1
expandA= A

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

while(expandA < B):
  expandA+=(A-1)
  count+=1


print(count)

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

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

tmp = a
c = 1

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

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

Solution (Python):
from sys import exit


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

for n in range(0, 20):
    if n == 0:
        num = 1
    elif n == 1:
        num = A
    else:
        num = n*A - n + 1

    if num >= B:
        print(n)
        exit()

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

Solution (Python):


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

Solution (Python):
import math
a, b = map(int, input().split())
if b != 1:
    if b> a:
        print(math.ceil((b-a)/(a-1)+1))
    else:
        print(math.ceil(b/a))
else:
    print(0)

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

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

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

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

import math
print(int(math.ceil((B-1)/(A-1))))

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

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

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

cover = lambda n: 1+(A-1)*n

n = 0
while True:
    if B <= cover(n):
        print(n)
        break
    n+=1

Solution (Python):

"""
oj dl https://atcoder.jp/contests/abc116/tasks/abc116_d -d test-d
oj test -d test-d -c "python abc116d.py"
oj test -d test-d -c "python abc116d.py" test-d/sample-3.in
"""
from collections import defaultdict
import sys
import math
from datetime import datetime
import re
import math
def sol(a, b):
    c = 1
    ans = 0
    if c >= b: return ans

    while c < b:
        c += a - 1
        ans += 1
    return ans



do_submit = True


def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    
    
    S = parsed_lines[0][0]
    return S


if not do_submit:
    S = input_parse("""
    1905
    """)
    print(sol(S))

    S = input_parse("""
    0112
    """)
    print(sol(S))

    S = input_parse("""
    1700
    """)
    print(sol(S))

    S = input_parse("""
    0000
    """)
    print(sol(S))

    S = input_parse("""
    1001
    """)
    print(sol(S))



else:
    A, B = list(map(int, input().split()))
    
    print(sol(A, B))

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

res = b - a
rez = -(-res//(a - 1))

rez = rez + 1

print(rez)

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

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

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

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

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

Solution (Python):
a,b = map(int,input().split())
tap = 0
num = 1
if b == 1:
    print(tap)
    exit()
tap += 1

while True:
    num = num + a - 1
    if b <= num:
        break
    else:
        tap += 1

print(tap)

Solution (Python):
t,h=map(int,input().split())
if h==1:
  print(0)
  exit()
if t>=h:
  print(1)
  exit()
a=(h-t)%(t-1)
print((h-t)//(t-1)+1) if a==0 else print((h-t)//(t-1)+2)

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

add = 0
if (b-1)%(a-1)>0:
    add = 1


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