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 bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline


def read_int():
    return int(input())


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


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(A, B):
    ans = 0
    c = 1
    while c < B:
        c += A - 1
        ans += 1
    return ans


def main():
    A, B = read_int_n()
    print(slv(A, B))


if __name__ == '__main__':
    main()

Solution (Python):
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

def s(generator, splitter, mapper):
    return [ mapper(s) for s in generator().split(splitter) ]


def get_nums_l():
    return [ int(s) for s in input().split(" ")]


def get_nums_n(n):
    return [ int(input()) for _ in range(n)]

a,b = get_nums_l()


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

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

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

print(ans)

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

socket = 1
buy = 0

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

print(buy)

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
sys.setrecursionlimit(10**7)
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return sys.stdin.readline().strip()
INF = 10 ** 18
MOD = 10 ** 9 + 7

debug = True


def dprint(*objects):
    if debug == True:
        print(*objects)

def solve():
    a, b = LI()

    cnt = 0
    ana = 1
    for i in range(1000):
        if ana >= b:
            break
        cnt += 1
        ana += (a - 1)

    print(cnt)

solve()

Solution (Python):
import sys
sys.setrecursionlimit(10**7)
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return sys.stdin.readline().strip()
INF = 10 ** 18
MOD = 10 ** 9 + 7

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

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

main()

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

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

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

ans = 0
ko = 1

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

print(ans)

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

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

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

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

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

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

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

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

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

count = 1
ans = 0
for i in range(20):
    if count >= b:
        break
    count += a-1
    ans += 1

print(ans)

Solution (Python):



import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline


a,b = [int(i) for i in readline().split()]



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

print(c)

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

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

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

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

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



ans = 0
while m > 1:
    m -= n - 1
    ans += 1
print(ans)

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

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


if __name__ == "__main__":
    [a, b] = li()

    tap_count = 1
    use_count = 0
    while tap_count < b:
        use_count = use_count + 1
        tap_count = tap_count + a - 1
    print(use_count)

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

print(math.ceil(B/A))

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

Solution (Python):
from math import ceil

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

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

print(ceil(t))

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

print(ans)

Solution (Python):
A, B= map(int, input().split())
ans = 0
for n in range(100):
  if (A-1)*(n-1) + A >= B:
    ans = n
    break
    
    
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):
A, B = map(int, input().split())

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

print(ans)

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

cnt = 1
if B == 1:
    print(0)
    os.sys.exit()
for i in range(B):
    cnt += A - 1
    if cnt >= B:
        break
print(i+1)

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

count = a - 1

res = (b - 1) // count

if (b -1) % count != 0:
    res += 1

print(res)

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

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

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

print(ans)

Solution (Python):
from collections import defaultdict, deque, Counter
import sys
import heapq
import math



sys.setrecursionlimit(1000000000)

MIN = -10 ** 9
MOD = 10 ** 9 + 7


def main():
    
    A, B = [int(a) for a in input().split()]
    
    
    
    
    
    
    for k in range(1000000000):
        if 1 + (A - 1) * k >= B:
            print(k)
            return


if __name__ == '__main__':
    main()

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

n = 1
count = 0

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

print(count)

Solution (Python):
import sys
sys.setrecursionlimit(10000000)
def input():
    return sys.stdin.readline()[:-1]
from collections import *
import math
from bisect import *
import functools
INF = float('inf')
mod = 10**9+7

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

Solution (Python):
"""
N = int(input())
N,M = map(int,input().split())
N_list = list(map(int,input().split()))
"""

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

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

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

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

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

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

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

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

counter = 0
plug = 1
while True:
    if plug >= B:
        break
    counter += 1
    plug += A - 1
print(counter)

Solution (Python):
def main():
    A, B = map(int, input().split())
    v = 1
    count = 0
    while v < B:
        v = v -1 + A
        count += 1
    return count
    
if __name__ == '__main__':
    print(main())

Solution (Python):


import itertools
from collections import Counter
from collections import defaultdict
from collections import deque
import bisect
from heapq import heappush, heappop

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


if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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

Solution (Python):
a, b = map(int, input().split())
print((b-2) // (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):
import sys
input = sys.stdin.readline

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

tmp = 1
tmp_ans =0
while(tmp<B):
    tmp -=1
    tmp += A
    tmp_ans+=1

print(tmp_ans)

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

kuti = 1
kosuu = 0

while kuti < B:
    kosuu += 1
    kuti += A - 1

print(kosuu)

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

Solution (Python):
ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))



def main():
    a,b = mi()
    cnt = 0
    a1 = a-1
    fin = 1
    for i in range(50):
        if fin >= b:
            break
        else:
            fin+=a1
            cnt+=1
    print(cnt)


main()

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

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

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)

def main():
    a,b = LI()
    c = 1
    r = 0
    for i in range(30):
        if c >= b:
            return r
        c += a-1
        r += 1

    return -1


print(main())

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

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

count = 1
n = 0
while count < B:
	count += A - 1
	n += 1

print(n)

Solution (Python):
import bisect
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7

A, B = list(map(int, sys.stdin.readline().split()))
a = math.ceil((B - 1) / (A - 1))
print(a)

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

Solution (Python):
a, b = map(int, input().split())
cnt = 0
sum = 1
while sum < b:
    sum += a-1
    cnt += 1
print(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())
print((b-2)//(a-1)+1)

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

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

now = 1

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

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

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

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    a, b = list(map(int, input().rstrip('\n').split()))
    t = 1
    cnt = 0
    while True:
        if t >= b:
            print(cnt)
            exit()
        else:
            t += a
            t -= 1
            cnt += 1


if __name__ == '__main__':
    slove()

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

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
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)]

sys.setrecursionlimit(1000000)
mod = 1000000007


def A():
    s = S()
    t = S()
    ans = 0
    for i in range(len(s)):
        if s[i] == t[i]:
            ans += 1
    print(ans)
    return


def B():
    a,b = LI()
    for i in range(10000):
        if 1+i*a-i >= b:
            print(i)
            return
    return


def C():

    return


def D():

    return


def E():

    return


def F():

    return


if __name__ == "__main__":
    B()

Solution (Python):

import sys
INF = float("inf")


def solve(A: int, B: int):
    print(-(-(B-1)//(A-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):
from math import ceil
A,B = map(int,input().split())
print(ceil((B-1)/(A-1)))

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

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

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

m = 1
ans = 0

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

print(ans)

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

A, B = getlist()

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

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

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

Solution (Python):


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

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

print(ans)

Solution (Python):
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools, os, pdb
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def _I(): return int(sys.stdin.readline())
def _F(): return float(sys.stdin.readline())
def _pf(s): return print(s, flush=True)
def perr(s): return print(s, file=sys.stderr)

A, B = LI()

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

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

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

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

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

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

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

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

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

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

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

print(ans)

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


if __name__ == "__main__":
    main()

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

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

print(ans)

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

Solution (Python):











import sys
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
from math import floor,ceil,sqrt,factorial,log 
from heapq import heappop, heappush, heappushpop
from collections import Counter,defaultdict
from itertools import accumulate,permutations,combinations,product,combinations_with_replacement
from bisect import bisect_left,bisect_right
from copy import deepcopy
inf=float('inf')
mod = 10**9+7
def INT_(n): return int(n)-1
def MI(): return map(int,input().split())
def MF(): return map(float, input().split())
def MI_(): return map(INT_,input().split())
def LI(): return list(MI())
def LI_(): return [int(x) - 1 for x in input().split()]
def LF(): return list(MF())
def LIN(n:int): return [I() for _ in range(n)]
def LLIN(n: int): return [LI() for _ in range(n)]
def LLIN_(n: int): return [LI_() for _ in range(n)]
def LLI(): return [list(map(int, l.split() )) for l in input()]
def I(): return int(input())
def F(): return float(input())
def ST(): return input().replace('\n', '')
def main():
    A,B = MI_()
    print(ceil(B/A))
    
if __name__ == '__main__':
    main()

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

Solution (Python):

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

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

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

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

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

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 sys

stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  

a, b = na()
ct = 1
step = 0
while ct < b:
    ct -= 1
    ct += a
    step += 1
print(step)

Solution (Python):
from collections import defaultdict,deque
import sys,heapq,bisect,math,itertools,string,queue,copy,time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

A,B = inpl()
N = 1
ans = 0
while N < B:
    N += -1 + A
    ans += 1

print(ans)

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

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

a-=1
b-=1

from math import ceil
print(ceil(b/a))

Solution (Python):
rr = raw_input
rri = lambda: int(raw_input())
rrm = lambda: map(int, raw_input().split())


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

print solve(*rrm())

Solution (Python):


from collections import deque, defaultdict
import itertools as ite
import sys
import math
import re

sys.setrecursionlimit(1000000)

INF = 10 ** 18
MOD = 10 ** 9 + 7

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

ans = 0
cnt = 1

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

print ans