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




from __future__ import division, print_function 

import sys
import os
from collections import Counter, deque, defaultdict
import itertools
import math
import io


"""Uncomment modules according to your need"""













if sys.version_info[0] < 3:
    input = raw_input
    range = xrange

    filter = itertools.ifilter
    map = itertools.imap
    zip = itertools.izip



"""value of mod"""
MOD = 998244353
mod = 10**9 + 7

"""Uncomment next 4 lines if doing huge recursion"""




def prepare_factorial(mod=mod):
    """ returns two lists, factorial and inverse factorial modulo argument by default 10**9 +7 """
    
    fact = [1]
    for i in range(1, 200005):
        fact.append((fact[-1] * i) % mod)

    ifact = [0] * 200005
    ifact[200004] = pow(fact[200004], mod - 2, mod)
    for i in range(200004, 0, -1):
        ifact[i - 1] = (i * ifact[i]) % mod
 
    return fact, ifact

def modinv(n, p):
    """ returns N inverse modulo p """
    return pow(n, p - 2, p)
 
def ncr(n, r,  fact, ifact):
    """ takes 4 arguments: n , r and factorial and inverse factorial lists"""
    t = (fact[n] * (ifact[r]*ifact[n-r]) % MOD)% MOD
    return t


def get_n(Sum):    
    """this function returns the maximum n for which Summation(n) <= Sum"""
    ans = (-1 + sqrt(1 + 8*Sum))//2
    return ans

def sieve(n):
    """ returns a list of prime numbers till n """
    if n < 2: return list()
    prime = [True for _ in range(n + 1)]
    p = 3
    while p * p <= n:
        if prime[p]:
            for i in range(p * 2, n + 1, p):
                prime[i] = False
        p += 2
    r = [2]
    for p in range(3, n + 1, 2):
        if prime[p]:
            r.append(p)
    return r



def divs(n, start=1):
    """ returns a list of all divisors till n """
    divisors = []
    for i in range(start, int(math.sqrt(n) + 1)):
        if n % i == 0:
            if n / i == i:
                divisors.append(i)
            else:
                divisors.extend([i, n // i])
    return divisors



def divn(n, primes):
    """ returns the number of divisors, two arguments n and the sieve till n """
    divs_number = 1
    for i in primes:
        if n == 1:
            return divs_number
        t = 1
        while n % i == 0:
            t += 1
            n //= i
        divs_number *= t



def lrfind(d, x, default=-1):
    """ Takes 2 arguments an iterable and an element. returns a tuple (firstoccurence,lastoccurence) -1 if not found """
    left = right = -1
    for i in range(len(d)):
        if d[i] == x:
            if left == -1: left = i
            right = i
    if left == -1:
        return default, default
    else:
        return left, right

def gcd(x, y): 
    """ returns greatest common divisor of x and y """
    while y:
        x, y = y, x % y
    return x

def ceil(n, k): return n // k + (n % k != 0) 
def input(): return sys.stdin.readline().strip()
def ii(): return int(input()) 
def mi(): return map(int, input().split()) 
def li(): return list(map(int, input().split())) 
def lw(): return input().split() 
def lcm(a, b): return abs(a * b) // gcd(a, b) 
def prr(a, sep=' ', end='\n'): print(sep.join(map(str, a)), end=end) 
def dd(): return defaultdict(int) 
def ddl(): return defaultdict(list) 
def write(s): return sys.stdout.write(s)


def main():
    
    a,b=mi()
    b-=a
    c=ceil(b,a-1)
    print(c+1)
""" -------- Python 2 and 3 footer by Pajenegod and c1729 ---------"""
 
py2 = round(0.5)
if py2:
    from future_builtins import ascii, filter, hex, map, oct, zip
    range = xrange
 
import os, sys
from io import IOBase, BytesIO
 
BUFSIZE = 8192
 
class FastIO(BytesIO):
    newlines = 0
 
    def __init__(self, file):
        self._file = file
        self._fd = file.fileno()
        self.writable = "x" in file.mode or "w" in file.mode
        self.write = super(FastIO, self).write if self.writable else None
 
    def _fill(self):
        s = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
        self.seek((self.tell(), self.seek(0, 2), super(FastIO, self).write(s))[0])
        return s
 
    def read(self):
        while self._fill(): pass
        return super(FastIO, self).read()
 
    def readline(self):
        while self.newlines == 0:
            s = self._fill();
            self.newlines = s.count(b"\n") + (not s)
        self.newlines -= 1
        return super(FastIO, self).readline()
 
    def flush(self):
        if self.writable:
            os.write(self._fd, self.getvalue())
            self.truncate(0), self.seek(0)
 
 
class IOWrapper(IOBase):
 
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        if py2:
            self.write = self.buffer.write
            self.read = self.buffer.read
            self.readline = self.buffer.readline
        else:
            self.write = lambda s: self.buffer.write(s.encode('ascii'))
            self.read = lambda: self.buffer.read().decode('ascii')
            self.readline = lambda: self.buffer.readline().decode('ascii')
 
 
sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)
input = lambda: sys.stdin.readline().rstrip('\r\n')


 
""" main function"""
 
if __name__ == '__main__':
    main()

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

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

print(cnt)

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


resolve()

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

count = math.ceil((b-1)/(a-1))

print(count)

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

count = math.ceil((b-1)/(a-1))

print(count)

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

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

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

Solution (Python):
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline



def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


def main():
    a, b = geta(int)

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

    print(ans)


if __name__ == "__main__":
    main()

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

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

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

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

Solution (Python):
import math

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

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

Solution (Python):
N,K = [int(x) for x in input().split()]
N = N-1
kosuu = 1
for i in range(1000):
    if kosuu >= K:
        print(i)
        break
    kosuu += N

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

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

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

cnt = 0
port = 1

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

Solution (Python):
import sys


def input(): return sys.stdin.readline().strip()
def I(): return int(input())
def LI(): return list(map(int, input().split()))
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 S(): return input()
def LS(): return input().split()


a, b = LI()
guchi = 1
ans = 0
while guchi < b:
    guchi += 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):
import math
a,b = list(map(int,input().split()))
ans = 0
num = 1
while (num < b):
    num -= 1
    num += a
    ans += 1

print(ans)

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

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

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

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

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

Solution (Python):
import math

A, B = [int(x) for x in input().split(' ')]
plug = 1
table_tap = 0

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

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

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

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

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

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

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

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

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

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

Solution (Python):




import sys
from fractions import gcd
import math
from math import ceil,floor
import collections
from collections import Counter











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

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

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

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

print(n)

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

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

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

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

sockets = 1
goal = b

ans = 0
while sockets < goal:
    ans += 1
    sockets += a - 1

print(ans)

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

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

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

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

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

Solution (Python):
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline



def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


def main():
    a, b = geta(int)

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

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

    print(n)


if __name__ == "__main__":
    main()

Solution (Python):
import math


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

def actual(a, b):
    return math.ceil((b - 1) / (a - 1))

print(actual(a, b))

Solution (Python):
import math

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

B -= A
A -= 1

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

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

Solution (Python):

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


n=1


ans=0



while True:
  
  if n>=b:
    print(ans)
    exit()
    
  n+=a
  n-=1
  ans+=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):

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

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

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

Solution (Python):
a, b = map(int, input().split())
count = 0
while a * count - (count - 1) < b:
  count += 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())
n=math.ceil((b-a)/(a-1))
print(n+1)

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

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

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())
first = 1
ans = 0
while first < b:
    first += a-1
    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())
n = (b-1)/(a-1)
print(math.ceil(n))

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

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

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

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

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

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

Solution (Python):
import math

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

def abc139B(a, b):
    return math.ceil((b-1)/(a-1))
print(abc139B(a, b))

Solution (Python):
import sys

input = lambda: sys.stdin.readline().rstrip()


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

    c = 1
    ans = 0

    while True:
        if c < B:
            c += (A - 1)
            ans += 1
        else:
            break

    print(ans)


if __name__ == '__main__':
    solve()

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

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

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

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

Solution (Python):
import sys


def input():
    return sys.stdin.readline().strip()

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

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

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

t = 1
cnt = 0

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

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

x = 1
n = 0

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

print(n)

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

x = 1
n = 0
while x < b:
  x += a - 1
  n += 1

print(n)

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

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

print(num)

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

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

if __name__ == "__main__":
    print(main())

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

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

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

Solution (Python):
L, R = map(int, input().split())
s = (R - 1) // (L - 1)
r = (R - 1) % (L - 1)
if r == 0:
  ans = s
else:
  ans = s + 1
print(ans)

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

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

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

print(ans)

Solution (Python):

import sys
input = sys.stdin.readline









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

from math import ceil
print(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())

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

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

Solution (Python):
from sys import stdin, setrecursionlimit


def main():
    input = stdin.buffer.readline
    a, b = map(int, input().split())

    ans = 0

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

    print(ans)


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

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

cnt = 0
total = 0

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

for i in range(30):
    if i == 0:
        total = a
        cnt += 1
    else:
        total += a-1
        cnt += 1
    
    if b <= total:
        break

print(cnt)

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

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

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

Solution (Python):

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

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

print(num)

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

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

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

ans = 0
outlet = 1

while outlet < B:
    outlet += A - 1
    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):
def solve(a, b):
    return (a+b-3) // (a-1)

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

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

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

Solution (Python):

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

Solution (Python):

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

Solution (Python):
import math

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

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

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

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

print(ans)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

count = 1
ans = 0

for i in range(20):
    if count >= b:
        break
    else:
        count += 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:
	cnt = 0
else: cnt = 1

B -= A


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

print(cnt)

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 6)

int1 = lambda x: int(x) - 1
def II(): return int(input())

def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())

def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def printlist(lst, k='\n'): print(k.join(list(map(str, lst))))
INF = float('inf')

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

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



if __name__ == '__main__':
    solve()

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

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

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

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

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

Solution (Python):

import sys
import math

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


def main():
    A, B = map(int, readline().split())
    
    
    ans = math.ceil((B - 1) / (A - 1))
    print(ans)


if __name__ == '__main__':
    main()

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

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

def main(a,b):
    if b<=a:
        return 1
    x=b-a
    q=x//(a-1)
    r=x%(a-1)
    if(r==0):
        return q+1
    else:
        return q+2

def main2(a,b):
    nc=1
    ntap=0
    while(nc<b):
        ntap+=1
        nc+=a-1
    return ntap

if __name__=='__main__':
    a,b=readinput()
    ans=main2(a,b)
    print(ans,end='')

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

if B == 1:
    print(0)
elif A > B :
    print(1)
else:
    while (A-1) * i + 1 < B:
        i += 1
    print(i)

Solution (Python):






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





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

print(ans)

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

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

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


answer = i

print(answer)

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

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

i=0

while True:

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

Solution (Python):
import numpy as np
import functools
import math
import collections
import scipy
import fractions
import itertools

def solve():
  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)
  return 0
 
if __name__ == "__main__":
  solve()

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

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

tmp = B // (A - 1)

if B == 1:
    print(0)
elif A == 2:
    print(B - 1)
elif tmp * (A - 1) + 1 >= B:
    print(tmp)
else:
    print(tmp + 1)

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

con_c = 1
ans = 0

while True:
    if con_c >= B:
        break
    ans += 1
    con_c += (A-1)

print(ans)

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

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

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]


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

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

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

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

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())
x=b-a
print(math.ceil(x/(a-1))+1)

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

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

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

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

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

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

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

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

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

if B == 1:
    print(0)
    exit()
elif B <= A:
    print(1)
    exit()
else:
    for i in range(20):
       if B <= A+i*(A-1):
           print(1+i)
           exit()

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

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

count = 0
while B > 1:
    B -= A - 1
    count += 1

print(count)

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

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

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

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

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

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

res = 0 if b == 1 else 1
b -= a
while b > 0:
    res += 1
    b -= a-1
print(res)

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

Solution (Python):

import sys
from math import ceil


def solve(A: int, B: int):
    ans = 0
    outlet = 1
    while B > outlet:
        outlet += (A - 1)
        ans += 1
    print(ans)
    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()