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 sys import stdin, stderr

def main():
   A, B = map(int, stdin.readline().split())
   res = 0
   E = 1
   while E < B:
      E -= 1
      E += A
      res += 1

   print(res)

   return 0

if __name__ == '__main__': main()

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

Solution (Python):

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

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

Solution (Python):
from sys import stdin
A,B = [int(x) for x in stdin.readline().rstrip().split()]
sasi = A
ans = 1
for i in range(200):
    if sasi >= B:
        break
    else:
        sasi += (A-1)
        ans += 1
if B == 1:
    ans = 0
print(ans)

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

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

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

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

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

Solution (Python):

def MAP():
    return map(int, input().split())

a,b=MAP()

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

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

count = 1
res = 0

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

print(res)

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

ans = 0

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

if (b - 1) % (a - 1) != 0 :
  ans += 1

print(ans)

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):
import numpy as np
A, B = list(map(int,input().split()))
print(int(np.ceil((B-A)/(A-1)+1)))

Solution (Python):
from sys import stdin
import math

A, B = [int(x) for x in stdin.readline().rstrip().split()]

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

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

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

Solution (Python):


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

All=1
count=0

while True:
    if All>=B:
        break
    else:
        All+=A-1
        count+=1

print(count)

Solution (Python):


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

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

print(n)

Solution (Python):
a, b = map(int, input().split(' '))
cnt = 0
avi = 1
while 1:
    if avi >= b:
        break

    cnt += 1
    avi += a - 1

print(cnt)

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

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

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

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

print(i)

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

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

taps = 0
kuchi = 1
while(kuchi<b):
    taps += 1
    kuchi = kuchi + a - 1


print(taps)

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

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

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

Solution (Python):
a, b = map(int, input().split())
ans, tmp = 0, 1
while (tmp < b):
    ans += 1
    tmp -= 1
    tmp += a
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 = [int(item) for item in input().split()]

count = 0
tap = 1

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

print(count)

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

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

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

Solution (Python):
import math


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


if __name__ == "__main__":
    a, b = map(int, input().split())
    print(main(a, b))

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

num = 1
for t in range(100):
  if B <= num:
    print(t)
    break
  num -= 1
  num += A

Solution (Python):
A, B = [int(x) for x in input().split()]
ans = 0
while(1):
    cnt = 1 + ans*(A-1)
    if (cnt >= 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 = list(map(int, input().split()))
if B ==1:
  print(0)
  exit()

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

print(ans)

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

cnt = 0
t = 1

while t < b:
    t += 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):
from sys import stdin
import math

a, b = [int(x) for x in stdin.readline().rstrip().split()]

ans = 0

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

print(ans)

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

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

print(ans)

Solution (Python):
def solve():
  a,b = (int(i) for i in input().split())
  ans = 1
  now = a
  if b == 1:
    print(0)
    exit()
  for i in range(10000):
    if now >= b:
      print(ans)
      exit()
    else:
      now += a-1
      ans +=1
    
solve()

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

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

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

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

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

Solution (Python):
from math import ceil

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

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

Solution (Python):

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

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

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

print(ans)

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 = -(-(b-1) // (a-1) )
print(ans)

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):
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 = 0
for i in range(0, 20):
    ct = a * i - (i - 1)
    if ct >= b:
        print(i)
        break

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

print(sockets)

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

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

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


sum = 1
count = 0

while True:

    if sum >= B:
        break

    sum = ((sum+A)-1)
    count = count + 1

print(count)

Solution (Python):
import math

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

Solution (Python):
import sys
import math
def input(): return sys.stdin.readline().strip()

mi = lambda: map(int, input().split())

A, B = mi()

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

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

Solution (Python):

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

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

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

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

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

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

C = 1

num = 0

while C < B:
    C = num * (A-1) + A
    num += 1

print(num)

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

count = (B-1)//(A-1) + (1 if (B-1)%(A-1)!=0 else 0)

print(count)

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

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

if B == 1:
    ans = 0

print(ans)

Solution (Python):
inp = [int(i) for i in input().split(' ')]
A = inp[0]
B = inp[1]

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

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

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

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

abab = 1
ans = 0

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

print(ans)

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

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

Solution (Python):
from sys import stdin
from math import ceil

a, b = [int(x) for x in stdin.readline().rstrip().split()]
print(ceil((b-1) / (a-1)))

Solution (Python):
A,B=(int(i) for i in input().split())
ans=1
t=0
while True:
    if B<=ans:
        print(t)
        break
    t+=1
    ans+=A-1

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

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

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

Solution (Python):
def main():
    a, b = map(int, input().split())
    float_num = (b-1)%(a-1)
    ans = (b-1)//(a-1)
    if float_num > 0:
        ans += 1
    print(ans)

main()

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

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

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

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

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

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

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

Solution (Python):

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

Solution (Python):
import sys


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


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

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

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


if __name__ == '__main__':
    main()

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

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

a = 1

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

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

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

Solution (Python):
''' بِسْمِ اللَّهِ الرَّحْمَٰنِ الرَّحِيمِ '''

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

Solution (Python):

from __future__ import division, print_function

import os
import sys
import math
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


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

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




BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        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")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")



if __name__ == "__main__":
    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):
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())
print(-(-(b-1)//(a-1)))

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

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

Solution (Python):
import collections as c
ip = lambda : map(int, input().split())

mod = 1e9+7
a,b = ip()
ans = 0
n = 1
while n<b:
    n = n - 1 + a
    ans+=1
print(ans)

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

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

Solution (Python):
import math

def resolve():
    a, b = map(int, input().split())

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



resolve()

Solution (Python):
a = input().split(' ')
A = int(a[0])
B = int(a[1])

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

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

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

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

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


print(cnt)

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

print(cnt)

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

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

Solution (Python):
import math

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

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

Solution (Python):


def main():
    A, B = map(int, input().split())
    i = 0
    sockets = 1
    while sockets < B:
        i += 1
        sockets = sockets -1 + A

    return i

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

Solution (Python):

import numpy as np

if __name__ == '__main__':
    A , B = map(int, input().split())

    num = 1
    tap = 0

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

    while True:
        tap += 1
        num -= 1
        num += A

        if num >=B:
            break

    print(tap)

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

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

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

Solution (Python):

a,b = map(int,input().split())
hole = 1
cnt = 0
while hole < b:
    hole = hole + (a - 1)
    cnt += 1

print(cnt)

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

Solution (Python):

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

tap = 0
concent = 1

while concent < b:
    tap += 1
    concent -= 1
    concent += a

print(tap)

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

b = B - A

s = b // (A - 1)
if(b % (A - 1) == 0) :
	print(s + 1)
else :
	print(s + 2)

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

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

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

print(ans)

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10**6)
readline = sys.stdin.readline
a,b = [int(i) for i in readline().split()]

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

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

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

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

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

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

ct = 0
c = 1

while b > c:
    c -= 1
    c += a
    ct += 1

print(ct)

Solution (Python):
import math

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

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

print(x)

Solution (Python):


import sys
import math
import collections
import itertools
from inspect import currentframe
INF = 10 ** 10
MOD = 10 ** 9 + 7
def input() : return sys.stdin.readline().strip()
def gcd(x, y) : return y if x % y == 0 else gcd(y, x % y)
def lcm(x, y) : return (x * y) // gcd(x, y)
def I() : return int(input())
def MI() : return map(int, input().split())
def LI() : return [int(x) for x in input().split()]
def RI(N) : return [int(input()) for _ in range(N)]
def LRI(N) : return [[int(x) for x in input().split()] for _ in range(N)]
def chkprint(*args) : names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}; print(', '.join(names.get(id(arg),'???')+' = '+repr(arg) for arg in args))

A, B = MI()

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

print(ans)

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

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

print(cnt)

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

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

x = 0
tap = 1
while 1:
    if tap >= B:
        print(x)
        break
    tap = tap-1+A
    x += 1

Solution (Python):
import sys
MAX_INT = int(10e9)
MIN_NUM = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

A,B = IL()

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

print(ans)

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

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

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

Solution (Python):
import sys

input = sys.stdin.readline


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

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

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


if __name__ == '__main__':
    AtCoder().main()

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


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

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

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
A,B=map(int,input().split())

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

Solution (Python):

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

q, mod = divmod(B-1, A-1)

if mod > 0:
  print(q+1)
else:
  print(q)

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

Solution (Python):
import sys, math; from collections import deque; readline=sys.stdin.readline;

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

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

print(a)

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

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

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

Solution (Python):
s = input().split(" ");
a = int(s[0]);
b = int(s[1]);

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

Solution (Python):
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())

c = (b - 1) // (a - 1)
d = (b - 1) % (a - 1)

if d == 0:
    print(c)
else:
    print(c + 1)

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

tap = 0

c = 1
while c < b:
    c += a - 1
    tap += 1

print(tap)

Solution (Python):
kuchi,kazu=map(int,input().split())

ans=0
nowkuchi=1
if kazu==1:
    print(0)
    exit()

while nowkuchi<kazu:
    nowkuchi+=kuchi-1
    ans+=1
print(ans)

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

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

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

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

    print(count)


if __name__ == '__main__':
    func()

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

ans = 0
a = 1
for i in range(21):
  if a < B:
    ans += 1
    a += A-1
  else:
    break
print(ans)

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

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

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

print(res)

Solution (Python):


import sys




tmp = input().split()
a,b = list(map(lambda a: int(a), tmp))

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

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

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

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

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

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

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

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

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

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

print(cnt)

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

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

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

sys.setrecursionlimit(10 ** 7)

def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x) - 1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())


a,b = li()
print(max(0, -(-(b-1) // (a-1))))

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

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

    print(ans)

if __name__ == '__main__':
    main()

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

Solution (Python):
s = input().split()
A = int(s[0])
B = int(s[1])
count = 0
mouse = 1
while(mouse<B):
    mouse += A-1
    count += 1
print(count)

Solution (Python):


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

n = (B - 1) // (A - 1)
if (B - 1) % (A - 1):
    n += 1

print(n)

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

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

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

count = 0
socket = 1

while(True):
    if socket >= B:
        break
    socket += A-1
    count += 1

print(count)

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

m, n = divmod(b-1, a-1)

if n == 0:
  print(m)
  
else:
  print(m+1)

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

Solution (Python):
hoge = input().split()
A = int(hoge[0])
B = int(hoge[1])

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

print(count)

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

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 = 1
n = 0
while c<B:
    c = c - 1 + A
    n += 1

print(n)

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

ans = (b-1)//(a-1)
if (b-1) % (a-1) > 0:
    ans += 1
print(ans)

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

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

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

print(ans)

Solution (Python):
a=[]
for x in input().split(" "):
    a.append(int(x))

n=1
i=0
while n<a[1]:
    n+=(a[0]-1)
    i+=1
print(i)

Solution (Python):


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


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

Solution (Python):

import sys
sys.setrecursionlimit(300000)


def solve(A: int, B: int):
    ret = 0
    if B == 1:
        ret = 0
    else:
        for i in range(100):
            if A + (A - 1) * i >= B:
                ret = i + 1
                break
    print(ret)
    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 main():
    input = sys.stdin.readline
    A, B = map(int, input().split())
    cnt = 0
    tap = 1
    while tap < B:
        tap += A - 1
        cnt += 1

    return cnt


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

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

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

if ans%1 > 0:
    ans += 1
print(int(ans))