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):
a, b = map(int, input().split())
i = 0
f = True
if b == 1:
    print('0')
    f = False

while f:
    i += 1
    
    if a*i-i+1 >= b:
        print(i)
        break

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

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

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

for i in range(20):
    if tap < b:
        ans += 1
        tap += a-1

    else:
        print(ans)
        break

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((B+A-3)//(A-1))

Solution (Python):
import math

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

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

Solution (Python):
A,B = map(int,input().split())
now = 1
ans = 0
for i in range(10**5):
    if now >= B:
        print(ans)
        break
    else:
        now += A-1
        ans += 1

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

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

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

ans = a
cnt = 1
while b>ans:
    ans += a-1
    cnt+=1

if b == 1:
    print(0)
else:
    print(cnt)

Solution (Python):
import math
data = input().split(' ')
a = int(data[0])
b = int(data[1])

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

Solution (Python):

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

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

print(ans)

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

t = b - 1
s = a - 1
ans = (t + s - 1) // s
print(ans)

Solution (Python):

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


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



sasikomiguti_misiyou=0
if B==1:
    print(0)
elif B<=A:
    print(1)
else:        
    sasikomiguti_misiyou =(tapp_num -1)*(A) +A
    if B <= sasikomiguti_misiyou-1:
        print(tapp_num)
    else:
        print(tapp_num +1)

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

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

ans = 0

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

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

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

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

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

Solution (Python):

import sys

A, B = [int(s) for s in input().split()]
if B == 1:
    print(0)
    sys.exit()

if A >= B:
    print(1)
    sys.exit()

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

print(tap)

Solution (Python):
import math
a, b = list(map(int, input().split(' ')))
hoge = 1
if b == 1:
    print(0)
else:
    ct = 0
    while hoge < b:
        hoge += a - 1
        ct += 1
        
    print(ct)

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

Solution (Python):
import os, sys, re, math

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

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

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

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

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

while 1:
    if plug>=b:
        print(t)
        exit()
    
    plug-=1
    plug+=a
    t+=1

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

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

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

Solution (Python):
from math import ceil
a, b = [int(x) for x in input().split()]
ans = ceil((b - 1) / (a - 1))
print(ans)

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

Solution (Python):
l=list(map(int,input().split()))
plug=((l[1]-l[0])//(l[0]-1))+1
if (l[1]-l[0])%(l[0]-1)!=0:
    plug=plug+1
print(plug)

Solution (Python):
l=list(map(int,input().split()))
plug=((l[1]-l[0])//(l[0]-1))+1
if (l[1]-l[0])%(l[0]-1)!=0:
    plug=plug+1
print(plug)

Solution (Python):
import sys
A,B = map(int,input().split())
plug = 1
socket = 0
while True:
  if plug >= B:
    print(socket)
    sys.exit(0)
  plug += A
  socket += 1
  plug -= 1

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





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

if n == int(n):
  print(int(n))
elif n >= int(n):
  print(int(n) + 1)

Solution (Python):


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

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

print(j)

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

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

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

if __name__ == '__main__':
    resolve()

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

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

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

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

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

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

print(ans)
'''

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

print(ans)

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

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

print(ans)

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

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

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

Solution (Python):

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

taps = 0

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

print(taps)

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

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

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

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

Solution (Python):
x, y = map(int, input().split())

ans = 0
outlet = 1

while outlet < y:
    outlet -= 1
    outlet += x
    ans += 1

print(ans)

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

print(k)

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

tap = 0
count = 1

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

print(tap)

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

inf = 10**7
if (B == 1):
    print(0)
    sys.exit()
for i in range(1, inf):
    if B <= ((A - 1) * (i - 1) + A):
        print(i)
        break

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

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

Solution (Python):
A,B = input().split(' ')
if int(B) >1:
    num = 1
    while (int(A)-1)*(num -1) + int(A) < int(B):
        num += 1
    print(num)
else:
    print(0)

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

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

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

    

print(cnt)

Solution (Python):
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))

A, B = MAP()

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

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

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

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

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

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

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

DR = [1, -1, 0, 0]
DC = [0, 0, 1, -1]

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
     
def main():
    A, B = LI()
    if B == 1:
        print(0)
        return
    tap = A
    cnt = 1
    while tap < B:
        tap += (A - 1)
        cnt += 1
    print(cnt)
        


main()

Solution (Python):
import math
A,B = [int(x) for x 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):
icase=0
if icase==0:
    a,b=map(int,input().split())
    n=(b-2)//(a-1)+1
    print(n)

Solution (Python):

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

from math import ceil

if b==1:
    print(0)
else:
    print(1+max(0,ceil((b-a)/(a-1))))

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

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

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

Solution (Python):
def pin(type=int):
    return map(type,input().rstrip().split())

def resolve():
    A,B=pin()
    ans=0
    plug=1
    while(1):
        if plug>=B:
            print(ans)
            break
        ans+=1
        plug=plug-1+A
        
resolve()

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

if B ==1:
  print(0)

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

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().rstrip().split()]

if B==1:
  print(0)
else:
  ans=A
  cnt=1

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

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

Solution (Python):
import math
def main():
    A, B = map(int, input().split())
    i = 0
    if B == 1:
        print(0)
    else:
        if B <= A:
            print(1)
        else:
            con = B
            while True:
                con -= A - 1
                i += 1
                if con <= A:
                    i += 1
                    break
            print(i)
main()

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

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

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

print(count)

Solution (Python):
import math


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


if __name__ == "__main__":
    resolve()

Solution (Python):
import math
input_line=input().split(" ")
A,B=int(input_line[0])-1,int(input_line[1])-1
print(math.ceil(B/A))

Solution (Python):
input_line=input().split(" ")
A,B=int(input_line[0]),int(input_line[1])
ans,port=0,1
while port<B:
    port=port+A-1
    ans=ans+1
print(ans)

Solution (Python):

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

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

if B == 1:
    i = 0

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

Solution (Python):

a, b = map(int, input().split())
if b == 1:
    print(0)
    exit()

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

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

import sys
import copy
from collections import deque


def main():

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

main()

Solution (Python):
x,y = map(int,input().split())
t = x
c = 1
if y == 1:
    print(0)
    exit()
for i in range(100):
    if t>=y:
        print(c)
        break
    t += x-1
    c += 1

Solution (Python):

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

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

Solution (Python):
'''
INPUT SHORTCUTS
N, K = map(int,input().split())
N ,A,B = map(int,input().split())
string = str(input())
arr = list(map(int,input().split()))
N = int(input())
'''


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

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

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

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

if B <= A:
  print(1)
  exit()

B -= A
ans = 1

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

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

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

Solution (Python):
def solve(a, b):
    n = 0
    c = 0
    while (True):
        c = a + (n - 1) * (a - 1)
        if c >= b:
            break
        else:
            n = n + 1
    return n

a, b = [int(x) for x in input().split()]
answer = solve(a, b)
print(answer)

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

print(n)

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

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):
import sys
sys.setrecursionlimit(10**6)
A,B = map(int,input().split())
cnt = 0
tmp = A
while True:
    cnt += 1
    if tmp >= B:
        break
    else:
        tmp += (A - 1) 

if B ==1:
    print(0)
else:
    print(cnt)

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

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

if __name__ == "__main__":
    main()

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

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

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

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

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

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


if __name__ == '__main__':
    main()

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

print(count)

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

Solution (Python):


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

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

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

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

Solution (Python):
"""
B - Power Socket
"""


import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline
from itertools import permutations,  combinations, accumulate
from functools import *
from collections import deque, defaultdict, Counter
from heapq import heapify, heappop, heappush, heappushpop

INF = float('inf')
NIL = - 1

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

total = 1
number = 0

while total < B:
    number += 1
    total = (total - 1) + A

print(number)

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

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

Solution (Python):
import sys
sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline
from itertools import permutations,  combinations, accumulate
from functools import *
from collections import deque, defaultdict, Counter
from heapq import heapify, heappop, heappush, heappushpop

INF = float('inf')
NIL = - 1

""" Input
S = input().rstrip()
N = int(input())
A = list(map(int, input().split()))
D = [int(input()) for _ in range(N)]
"""

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

total = 1
number = 0

while True:
    if total >= B:
        break

    number += 1
    total = (total - 1) + A

print(number)

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

Solution (Python):
import math

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

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

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

a = int(a)
b = int(b)

count = 0

if b == 1:
    print('0')
else:
    while True:
        if b <= a:
            count += 1
            break
        elif b <= 0:
            break
        else:
            b = b - a + 1
            count = count + 1

    print(count)

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

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())
for i in range(30):
    if 1+(A-1)*i >= B:
        print(i)
        break

Solution (Python):
a, b = input().split()
 
a = int(a)
b = int(b)
 
count = 0
 
if b == 1:
    print("0")
else:
    while True:
        if b <= a:
            count += 1
            break
        else:
            b=b-a+1
            count = count + 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:
    print(0)
elif a<b:
    x=(b-1)//(a-1)
    if (b-1)%(a-1)==0:
        print(x)
    else:
        print(x+1)
else:
    print(1)

Solution (Python):
from sys import stdin
import queue
import sys
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())
import math
print(math.ceil((b-1)/(a-1)))

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

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

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

Solution (Python):
from collections import defaultdict, deque
import sys
import heapq
import bisect
import itertools
import queue
import copy
import time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7

def inp(): return int(sys.stdin.readline())

def inpl(): return list(map(int, sys.stdin.readline().split()))

def inpl_str(): return list(sys.stdin.readline().split())

a, b = inpl()
c = a-1
d = b-1
print((d+c-1)//c)

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

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

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

print(A_num)

Solution (Python):
import math

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


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

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

Solution (Python):


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

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

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

Solution (Python):
import sys, itertools, fractions, math, collections, heapq
sys.setrecursionlimit(10**7)
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, d=DVSR): return pow(x, d - 2, d)
def DIV(x, y, d=DVSR): return (x * INV(y, d)) % d
def LI(): return [int(x) for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()
def II(): return int(input())

a, b = LI()
ans = 0
total = 1
while total < b:
    total += 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())

ent = 1
cnt = 0
for _ in range(20+1):
  if ent<b:
    ent += a
    ent -= 1
    cnt +=1
  else:
    print(cnt)
    exit()

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

Solution (Python):
A, B = map(int, input().split())
def function(A, B):
  if B == 1:
    return 0
  elif B <= A:
    return 1
  else:
    return (B-1+A-2)//(A-1)
  
print(function(A,B))

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

Solution (Python):

a, b = input().strip().split()

a, b = int(a), int(b)

ans= 0
outlet = 1

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

print(ans)

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

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

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

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



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

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

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

resolve()

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(1+math.ceil((B-A)/(A-1)))

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

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 = 1
ans = 0

while True:
    if tap >= b:
        break
    tap += a - 1
    ans += 1

print(ans)

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

Solution (Python):
import math

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

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

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

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

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

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

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

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

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

outlet = 1
taps = 0
while outlet < b:
    taps += 1
    outlet += a - 1

print(taps)

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

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

  
for i in range(10000):
  if ans >= b:
    print(i+1)
    exit()

  else:
    ans += a -1

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

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

  
for i in range(10000):
  if ans >= b:
    print(i+1)
    exit()

  else:
    ans += a -1

Solution (Python):
import sys


def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def MI1(): return map(int1, sys.stdin.readline().split())

def LI(): return list(map(int, sys.stdin.readline().split()))

def LLI(rows_number): return [LI() for _ in range(rows_number)]
def SR(): return sys.stdin.readline().rstrip()

ascii_lowercase = 'abcdefghijklmnopqrstuvwxyz'
ascii_uppercase = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
ascii_uppercase2 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHIJKLMNOPQRSTUVWXYZ'


p2D = lambda x: print(*x, sep="\n")
p2E = lambda x: print(''.join(x))
p2S = lambda x: print(*x, sep=" ")



a,b=MI()
x=a

if b == 1:
    print(0)
    exit()
if x >= b:
    print(1)
    exit()
for i in range(2,21):
    x+=(a-1)
    if x >= b:
        print(i)
        exit()

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

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7


A, B = MAP()
C = (B-A)/(A-1) +1
if C%1 == 0:
  print(int(C))
else:
  print(int(C+1))

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

Solution (Python):
a,b = map(int, input().split())
print((b + a - 3) // (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())

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

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
import math
import io

nim, mike = map(int, input().split())
    
print(math.ceil((mike - 1)/(nim - 1)))

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

if B == 1 :
    ans = 0
else:
    ans=math.ceil((B-1)/(A-1))

print(ans)

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

x = a[0]
y = a[1]

n = 2
if y == 1:
    print(0)
elif x >= y:
    print(1)
else:
    while ((x * n) - (n - 1)) < y:
        n += 1
    print(n)

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

print(count)

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

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

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

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