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

sys.setrecursionlimit(10000000)
import os
import math
import bisect
import collections
import itertools
import heapq
import re
import queue



ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)


MOD = 10 ** 9 + 7
MAX = float('inf')


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

    A, B = il()
    tap = 1

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


if __name__ == '__main__':
    main()

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

Solution (Python):
il = [int(k) for k in input().split()]
A = il[0]
B = il[1]
for i in range(B):
    if i * A - i + 1 >= B:
        print(i)
        break

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

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

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

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

Solution (Python):
A, B = [int(A) for A in input().split()] 
socket = 0
count = 0
if B==1 :
    count=0
elif B != 0 :
    while socket < B :
        if socket + A < B :
            socket = socket + A - 1
            count += 1
        elif socket+A >= B :
            socket = socket + A
            count += 1
print(count)

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

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

Solution (Python):
def power_socket(a, b):

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

    return ans

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

if __name__ == '__main__':
    main()

Solution (Python):
import math
A,B = [int(x) for x in 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())
i = a
c = 1
while int(i) < b:
  i += a - 1
  c += 1
if b ==1:
  print(0)
else:
  print(c)

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

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 = (B - A) // (A - 1) + 1
print(ans + 1 if (B - A) % (A - 1) else ans)

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

ans = 0
ana = 1

for i in range(b*2):
    if ana >= b:
        break
    else:
        ans +=1
        ana = ana + a -1

print(ans)

Solution (Python):
def sum(A, B):
  n = 0
  while True:
    if n >= (B-1)/(A-1):
      return n
    else:
      n += 1

num = input().split(' ')
A = int(num[0])
B = int(num[1])

n = sum(A,B)
print(n)

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

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

while count < B:
    count +=  A - 1
    i += 1

print(i)

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

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

print(cnt)

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

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

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

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

print(ans)

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

Solution (Python):


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


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

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

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

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

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

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

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

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


a, b = invr()
c = 0
outlet = 1
while outlet < b:
    outlet -= 1
    outlet += a
    c += 1
print(c)

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

def f(k):
  return k*A - k +1

l = 0
r = 20

while l<r:
  m = (l+r)//2
  if f(m) >= B:
    r = m
  else:
    l = m+1
print(r)

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

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

Solution (Python):
x, y = map(int, input().split())
if y == 1:
    print(0)
elif y <= x:
    print(1)
else:
    cnt = 1
    total = x
    while True:
        total += (x - 1)
        cnt += 1
        if total >= y:
            break
    print(cnt)

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

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

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

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

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

Solution (Python):
import sys

def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

A, B = LI()

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

print(ans)

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

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

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

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

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

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

print(ans)

Solution (Python):

import math

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

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

print(math.ceil(ans))

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

Solution (Python):
tap_socket_num, required_socket = map(int, input().split())

if required_socket <= 1:
    print(0)
elif required_socket <= tap_socket_num:
    print(1)
else:
    n = (required_socket-tap_socket_num)%(tap_socket_num - 1)
    if n == 0:
        print((required_socket - tap_socket_num)//(tap_socket_num - 1) + 1)
    else:
        print((required_socket - tap_socket_num)//(tap_socket_num - 1) + 2)

Solution (Python):
a,b = map(int,input().split())
a_add = a-1
count = 1
while b > a:
    a += a_add
    count += 1
if b == 1:
    print(0)
else:
    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())
print((a+b-3)//(a-1))

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

Solution (Python):

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

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

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

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

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

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

for i in range(1,23):
  if i*(A-1)+1 >= B:
    print(i)
    sys.exit()

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

Solution (Python):

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

cnt = 0
socket = 1
while socket < B:
    cnt += 1
    if cnt == 1:
        socket = A
    else:
        socket += A - 1

print(cnt)

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

print(num)

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

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

print(ans)

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

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

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

print(ans)

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

Solution (Python):
import math
import time
from collections import defaultdict, deque
from sys import stdin, stdout
from bisect import bisect_left, bisect_right
a,b=map(int,stdin.readline().split())
print(math.ceil((b-1)/(a-1)))

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

for n in range(1000):
    if n*a-n+1 >= b:
        print(n)
        break

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

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

Solution (Python):
import math

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

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

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

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

print(n)

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

count = 0

if not A == B:
    while ((count*A)-(count-1)) < B:
        count += 1

else:
    count += 1

print(count)

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

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

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

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





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

print(ans)

Solution (Python):
import math

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

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

print(ans)

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

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())
count=1
A_sample=A

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

Solution (Python):
def resolve():
    x,y = map(int,input().split())
    ans = (y-2) // (x-1) + 1
    print(ans)
resolve()

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

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

Solution (Python):
import sys
from io import StringIO
import unittest


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

    ans = 0
    tmp = 1

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

    print(ans)


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """4 10"""
        output = """3"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """8 9"""
        output = """2"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """8 8"""
        output = """1"""
        self.assertIO(input, output)


if __name__ == "__main__":
    
    resolve()

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

Solution (Python):





inp = input().split()
for a in inp:
    out = int(a)
inp.pop(1)
for a in inp:
    i = int(a)
    
n = 1
while (i*n-(n-1)) < out:
    n += 1

else:
    if out == 1:
        print(0)
    else:
        print(n)

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

S = A
num  = 1
i = 1

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

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

S = A
num  = 1
i = 1

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

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

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

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

tmp = 1
ans = 0

while tmp < b:
    tmp += (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):




hairu = input()
sockets = 0
plugs = 1
ab = hairu.split()

while True:
    if int(ab[1]) == 1:
        print(0)
        break

    sockets += 1
    plugs -= 1
    plugs += int(ab[0])
    if int(ab[1]) <= plugs:
        print(sockets)
        break

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

Solution (Python):






import sys
input = sys.stdin.readline

import math
from collections import deque
from fractions import gcd
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr


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





A,B = inputIL()

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

Solution (Python):
x = input().split()

a = int(x[0])
b = int(x[1])

c = 1
outlet = a
if(b==1):
  print(0)
  exit()

while True:
  if(outlet >= b):
    print(c)
    break
  elif(outlet < b):
    c = c + 1
    outlet = outlet + a - 1

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

sumu = 1
count = 0
while True:
    if B == 1:
        break
    sumu += A-1
    count += 1
    if sumu >= B:
        break

print(count)

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

Solution (Python):
import sys
import math
import bisect

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

if __name__ == "__main__":
    main()

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

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

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

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

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

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

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

Solution (Python):

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

Solution (Python):

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

Solution (Python):

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

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

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

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

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

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

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

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

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

print(result)

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

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

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

Solution (Python):
def main():
    A, B = map(int, input().split())
    num_socket = 1
    num_tap = 0 
    while num_socket < B:
        num_tap += 1
        num_socket += A - 1
    print(num_tap)


if __name__ == '__main__':
    main()

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

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

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

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

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

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

Solution (Python):
import math
s = input().split()
A = int(s[0])
B = int(s[1])
y = (B - 1) / (A - 1)
x = math.ceil(y)
print(x)

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

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

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

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

Solution (Python):
a, b = (int(i)for i in input().split())
ans =0
d = 1
while d<b:
  ans+=1
  d = d-1+a
print(ans)

Solution (Python):
a,b = (int(i)for i in input().split())
ans = 0
d = 1
while d<b:
  ans+=1
  d = d-1+a
print(ans)

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

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

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










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

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

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

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

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

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

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

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce


import sys
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = float('inf')


a, b = Is()

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

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

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

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

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

Solution (Python):

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

Solution (Python):
def main():
    s, t = list(map(int, input().split()))
    tap = 1
    count = 0
    while tap < t:
        tap += s - 1
        count += 1
    print(count)


if __name__ == '__main__':
    main()

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

Solution (Python):

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

pul = 1
cnt = 0
while pul < B:
    pul += 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())
kuchi =  1
cnt = 0
if kuchi <= b:
    for i in range(1, 20):
        if kuchi >= b:
                break
        else:
            for j in range(1, a ** i):
                if kuchi >= b:
                    break
                else:
                    if j < a ** i:
                        cnt += 1
                        kuchi = kuchi - 1 + a
                    else:
                        kuchi = kuchi * a
                        cnt += kuchi / a 
print(cnt)

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