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-----
4 10

-----Sample Output-----
3

3 power strips, each with 4 sockets, extend the socket into 10 empty sockets.

Difficulty: introductory

Starter code:

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

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

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

print(tap)

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

cnt = 0
plug = 1

if b > 1:
    while plug < b:
        plug = plug - 1 + a
        cnt += 1

print(cnt)


a,b=map(int,input().split());print(-(-(b-1)//(a-1)))

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


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

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


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

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

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



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

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

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


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

a, b = map(int, input().split())
con = 1
ans = 0

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

import math
A, B = map(int, input().split())
if B == 1:
    N = 0
elif A < B:
    N = math.ceil((B-A)/(A-1)) + 1
else:
    N = 1

print(N)

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

print(ans)

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

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

import math

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

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


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

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

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

print(i)


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

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

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

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

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


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

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

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

A, B = map(int, input().split())
cnt = 1
total = A

if B == 1:
    print(0)
else:
    while total < B:
        total += A - 1
        cnt += 1
    print(cnt)

a,b=list(map(int,input().split()))
if b==1: print((0)); return;
for i in range(1,1000):
  if b<=a*i-(i-1):
    print(i)
    return


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


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


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

g = a - 1
d, r = divmod(b - 1, g)
if r == 0:
    print(d)
else:
    print(d + 1)

A, B = map(int, input().split())
ans = 0
res = 1

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

print(ans)

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

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

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

a, b = [int(i) for i in input().split()]
ans = (b - 1) // (a - 1) + 1 if (b - 1) % (a - 1) else (b - 1) // (a - 1)
print(ans)

a,b=map(int,input().split())
tmp=1#空き
ans=0#タップをさした数
while True:
    if tmp>=b:
        break
    tmp-=1
    tmp+=a
    ans+=1
print(ans)

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

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


a,b=(int(x) for x in input().split())
ans=0
count=1
while count<b:
    count+=a-1
    ans+=1
print(ans,'\n')

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

#!/usr/local/bin/python3
import math

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

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


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

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

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


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

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

if B == 1:
    print(0)
elif A >= B:
    print(1)
else:
    count = 0
    for n in range(1, 100):
        if A + (A - 1) * n >= B:
            print(n + 1)
            break

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

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

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

print(ans)


x,y=map(int,input().split())
ans=1
total=x
while total<y:
  ans+=1
  total+=x
  total-=1
print(ans if y!=1 else 0)

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

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

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

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

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

outlet=1
tap=0

while outlet<B:
  outlet=outlet-1+A
  tap=tap+1
  if outlet>=B:
    break

print(tap)

a,b = [int(x) for x in input().split()]
res = 0
c = 1
while c < b:
  c += a-1
  res += 1
print(res)

A, B = map(int, input().split())
num = 1
for i in range(20):
    if i != 0:
        num += (A - 1)
    if num >=B:
        print(i)
        break

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


N,K = map(int,input().split())
c = N
ans = 1
if K == 1:
    print(0)
else:
    while c < K:
        ans += 1
        c += N-1
    print(ans)

#ABC139 B

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

from sys import stdin
nii=lambda:map(int,stdin.readline().split())
lnii=lambda:list(map(int,stdin.readline().split()))

a,b=nii()

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

print(ans)

import math
A, B = map(int, input().split())
 
# A*x-(x-1) >= B
# (A-1)*x >= B-1
# x >= ceil((B-1)/(A-1))
print(math.ceil((B-1)/(A-1)))

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

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

import math

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

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

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


import math as mt
a,b=map(int, input().split())
n=1
while a+(a-1)*(n-1)<b:
    n+=1
print(n if b!=1 else 0)

from math import ceil


def answer(a: int, b: int) -> int:
    return ceil((b - 1) / (a - 1))


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


def __starting_point():
    main()

__starting_point()

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

# シミュレーションで解く場合：
# 電源タップの個数をa, 差込口の個数をnumとおく 
a = 0
num = 1
while num < B:
  num -= 1
  num += A
  a += 1

print(a)

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

N = 0
sum = 1

while (sum < B):
     N += 1
     sum = A + (A-1)*(N-1)

     if sum >= B:
         break

ans = N

print(ans)


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

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

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

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

import math

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

print(N)

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

if B == 1:
    print(0)

elif A >= B:
    print(1)

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

import sys

A, B = map(int, sys.stdin.readline().split())
print((B - A - 1) // (A-1) + 2)

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

a,b = map(int,input().split())
ans = 1
i = 0
if b != 1:
    while ans <b:
        i += 1
        ans = a + (a-1)*(i-1)

print(i)

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

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

print(ans)

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

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

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


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

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

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

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

A,B=input().split()
a=int(A)
b=int(B)
for i in range(b):
    if 1+a*i-i>=b:
        print(i)
        break

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

import math
a, b = [int(n) for n in input().split()]
print((math.ceil((b-1)/(a-1))))


A, B = list(map(int, input().split()))
 
# A*x-(x-1) >= B
# (A-1)*x >= B-1
# x >= ceil((B-1)/(A-1))
print((-(-(B-1)//(A-1))))


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

a,b=map(int,input().split())
t=a
count=1
if b!=1:
    while t < b:
        t+=(a-1)
        count+=1
    print(count)
else:
    print(0)

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

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

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

for i in range(25):
    if b <= a + (a - 1)*(i-1):
        print(i)
        break    

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

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

print(ans)


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

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

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

A,B=map(int,input().split())
answer=1
plug=A

if B==1:
  print(0)
  return

while B>A:
  answer+=1
  A+=(plug-1)

  
print(answer)

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

print(n)

A, B = map(int, input().split())
 
# 答えは、ceil((B-1)/(A-1))
A -= 1
B -= 1
print(-(-B//A))