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

deff=1
i=0

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

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

Solution (Python):

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

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

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


print( ans if ans != 0 else 1 )

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

count = 0
if B != 1:
    count += 1
    tap = A
    while tap < B:
        count += 1
        tap = count * (A - 1) + 1

print(count)

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

import math
if B < 2:
    print(0)
    exit()
c = 0


moti = 1
c = 0
while True:
    moti = (moti - 1) + A
    c += 1
    if moti >= B:
        print(c)
        break

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

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

if a >= b:
    print(1)
    exit()
b -=a
print(1 + -(-b//(a-1)))

Solution (Python):
import math

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









    





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

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

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



count = 1
tap = 0

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

print(tap)

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

m=1
ans=0

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

print(ans)

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

result = 0
count = 1
while(True):
    if nums[1] <= 1:
        break
    count -= 1
    count += nums[0]
    result += 1
    if nums[1] <= count:
        break
print(result)

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

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

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

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

Solution (Python):
import math
import copy
import sys
import fractions
import numpy as np
from functools import reduce



def getInputInt():
    inputNum = int(input())
    return inputNum

def getInputListInt():
    outputoData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData

def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList

def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList



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

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

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

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

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

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

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):
import math
a = input().split()
b = [int(i) for i in a] 

c = b[0]
d = b[1]
amari = 0
if c/d == 1:
  print("1")
else:
  f = math.ceil((d-c)/(c-1))
  print(f+1)

Solution (Python):
a,b=map(int,input().split())
if b==1:
  print(0)
if 1<b<=a:
  print(1)
for i in range(a):
  if (a-i+i*a)<b<=(a-(i+1)+(i+1)*a):
    print(1+(i+1))
for i in range(a**2):
  if ((a**2)-i+i*a)<b<=((a**2)-(i+1)+(i+1)*a):
    print(1+a+(i+1))
for i in range(a**3):
  if ((a**3)-i+i*a)<b<=((a**3)-(i+1)+(i+1)*a):
    print(1+a+(a**2)+(i+1))
for i in range(a**4):
  if ((a**4)-i+i*a)<b<=((a**4)-(i+1)+(i+1)*a):
    print(1+a+(a**2)+(a**3)+(i+1))
for i in range(a**5):
  if ((a**5)-i+i*a)<b<=((a**5)-(i+1)+(i+1)*a):
    print(1+a+(a**2)+(a**3)+(a**4)+(i+1))

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

Solution (Python):

a, b = list(map(int, input().split()))
tap, free = 0, 1

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

print(tap)

Solution (Python):

A, B = input().split()


a_org = int(A)
a = int(A)
b = int(B)
i = 1

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

Solution (Python):
import math
lines = input().split(" ")
 
A = int(lines[0])
B = int(lines[1])
C = A - 1
result = 0
 
if B == 1:
  print(0)
elif B == 2:
    print(1)
elif A == 20:
    print(1)
elif A >= B:
    print(1)
else:
    result += A
    count = 1
    while result < B:
        result += C
        count += 1
    print(count)

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

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

print(tap)

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

socket = 0
count  = 0

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


while True:
	count  += 1
	socket += A-1
	if B - socket <= 1:
		print(count)
		sys.exit()

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

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

tap = 0
plug = 0

while(True):
  plug = (A-1) * (tap-1) + A
  if plug >= B:
    print(tap)
    break
  tap += 1

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

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

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

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

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

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

print(ans-1)

Solution (Python):
import sys
import math
 
A, B = list(map(int, sys.stdin.readline().split(' ')))

C = math.ceil((B - 1) / (A - 1))
 
print(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().strip().split())
import math
print(math.ceil((B-1)/(A-1)))

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

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


if __name__ == '__main__':
    main()

Solution (Python):


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

no_used = A

res = 1
while True:
    if no_used >= B:
        break
    else:
        res += 1
        no_used += A-1

print(res if B >= 2 else 0)

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

count = A
ans = 1

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

while True:
    b = A * ans - (ans - 1)
    if b >= B:
        print(ans)
        exit()
    ans += 1

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

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

Solution (Python):
line = input().split(" ")
A = int(line[0])
B = int(line[1])
kuchi = 1
kuchinum = 0
for i in range(19):
  if kuchi < B:
    kuchi += (A - 1)
    kuchinum += 1
  else:
    i = 13
print(kuchinum)

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

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

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

cnt = 0
tmp = 0
if B < 2:
    print(cnt)
    exit()
tmp += A
cnt += 1
while True:
    if tmp >= B:
        break
    tmp += A -1
    cnt += 1
    
print(cnt)

Solution (Python):
import math
arr = list(map(float, input().split()))
A,B=arr[0],arr[1]

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

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

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

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


p = 0
total = 1

while total < B:
    p += 1
    total = total + A - 1

print(p)

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

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

Solution (Python):
from math import ceil
a,b=[int(i) for i in input().split()]
if a-1==1:
    print(b//(a-1)-1)
elif b%(a-1)==1:
    print(b//(a-1))
else:
    print(ceil(b/(a-1)))

Solution (Python):
A,B = map(int,input().split())
C = A-1
n = 0
m = 1

if B == 1:
    print('0')
else:
    while C*n + A*m < B:
        n += 1
    print(n + m)

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

Solution (Python):

import sys

import heapq
import re
import bisect
import random
import math
import itertools
from collections import defaultdict, deque
from copy import deepcopy
from decimal import *

readl= lambda: list(map(int, sys.stdin.readline().split()))
readt= lambda: tuple(map(int, sys.stdin.readline().split()))
read = lambda: sys.stdin.readline().rstrip()
readi = lambda: int(read())
readmi = lambda: map(int, sys.stdin.readline().split())
readms = lambda: map(str, sys.stdin.readline().split())

a, b = readmi()

cnt = a
count = 1
if b == 1:
    print(0)
    exit()
while(1):
    if cnt >= b:
        break
    cnt -= 1
    cnt += a
    count += 1
print(count)

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

Solution (Python):
import math

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

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

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

c = A
count = 1
for i in range(1, 1000):
    if c >= B:
        break
    c = c + A - 1
    count = count + 1
    
if B == 1:
    print(0)
else:
    print(count)

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


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

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

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

Solution (Python):
from math import ceil
A,B = map(int,input().split())
count = 0 
num = 1
while num < B:
    num -= 1
    num += A
    count += 1
    
print(count)

Solution (Python):
s = input().split()
s_i = [int(d) for d in s]
c = 1
cnt = 0
while s_i[1] > c:
    c = c - 1 + s_i[0]
    cnt = cnt + 1

print(cnt)

Solution (Python):
A, B = (int(x) for x in input().split())
kuchi = 1
plug = 0
while kuchi < B:
    kuchi = kuchi + A - 1
    plug = plug + 1
print(plug)

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

tap = int(i[0])
need = int(i[1])
count = 1
needed_tap = 0
while count < need:
  count = count + (tap - 1)
  needed_tap = needed_tap +1
 
print(str(needed_tap))

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

Solution (Python):
A, B = map(int, input().split())
if B == 1:
    print(0)
else:
    q, mod = divmod(B, A-1)
    if mod <= 1 and A == 2:
        print(q-1)
    elif mod <= 1:
        print(q)
    else:
        print(q+1)

Solution (Python):
A, B = [int(i) for i in input().split(" ")]
if B == 1:
  print(0)
elif B <= A:
  print(1)
else:
  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())
s = 1
i = 0
while s < b:
    i += 1
    s += a-1
print(i)

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

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

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

print(ans)

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

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

if A == 2:
    ans = B-1

elif B == 1:
    ans = 0
    
else:
    ans = 1 + (B-2)//(A-1)

print(ans)

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

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

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

print(ans)

Solution (Python):













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

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

Solution (Python):
from math import ceil
def main():
    A, B = [int(i) for i in input().split()]
    one = A
    many = 0
    for N in range(20):
        if A * 1 + (A-1) * N >= B:
            many = N + 1
            break
    if B == 1:
        print(0)
        exit()
    if A >= B:
        print(1)
    else:
        print(many)
main()

Solution (Python):
s=list(map(int,input().split()))
a=0
b=s[0]-1
if s[1]==1:
  print(a)
else:
  a=a+1
  while s[1]>s[0]:
    a=a+1
    s[0]=s[0]+b
  print(a)

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

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

Solution (Python):

 
import sys
 
debug = False
 
def log(text):
    if debug:
        print(text)
 
def parse_input(lines_as_string = None):
 
    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]
 
    token = lines[0].split()
    a = int(token[0])
    b = int(token[1])
 
    return (a, b)
 
 
def solve(a, b):
  
    if b == 1:
        return 0

    result = -1
    for n in range(1, 20):
        if a + (n-1)*(a-1) >= b:
            result = n
            break
        
 
    return result
 
 
def main():
    
 
    print("%s" % solve(*parse_input()))
 
if __name__ == '__main__':
 
    main()

Solution (Python):
S = input().split()
cnt = 1
num = int(S[0])

if int(S[1]) == 1:
  print(0)
else:
  while(num < int(S[1])):
    num += (int(S[0]) - 1)
    cnt += 1
  print(cnt)

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


if B ==1:
  k=0
else:
  k=1

t = B-A

if t > 0:
  q, mod = divmod(t, A-1)

  k=k+q
  if mod != 0:
    k = k+1

  

print(k)

Solution (Python):
import math

A,B = (int(x) for x in input().split())
ans = math.ceil((B-1)/(A-1))
print(ans)

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

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


num = (B-1) / (A-1)

if (B-1) % (A-1) != 0:
	num += 1

print(int(num))

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

while True:
    if A < B:
        A += tmp - 1
        ans += 1
    else:
        break

print(ans)

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

for i in range(50):
	if B<=A*i-(i-1):
		print i
		quit()

Solution (Python):
List = list(map(int, input().split()))
A = List[0]
B = List[1]
if B==1:
    print(0)
else:
    i=1
    K=0
    while True:
        if B<=(A*i-K):
            print(i)
            break
        i+=1
        K+=1

Solution (Python):
import sys

input_str = input().split(" ")
A = int(input_str[0])-1
B = int(input_str[1])
rem = (B-1)%A
ans = int((B-1)/A)
if rem!=0:
    ans += 1
if B==1:
  ans = 0
print(ans)

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

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

x = a

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

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

Solution (Python):
import sys
import math
from fractions import gcd





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

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""


 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())


 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

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

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


now = A
cnt = 1
while True:
    if now >= B:
        break
    now += (A - 1)
    cnt += 1

print(cnt)

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

for n in range(1, 20):
    if B == 1:
        print(0)
        break

    if (A - 1) * (n-1) + A >= B:
        print(n)
        break

Solution (Python):
A,B = map(int,input().split())
count = 1
C = A
if B == 1:
    print("0")
else:
    while C < B:
        count+=1
        C = A + C - 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:
    ans = 0
else:
    c = a
    ans = 1
    while c < b:
        ans += 1
        c += a - 1
print(ans)

Solution (Python):
A, B = map(int,input().split())
T = A
if B == 1:
	print(0)
elif T >= B:
	print(1)
else:
	for i in range(2,50):
		if T < B:
			T += A-1
			continue
		else:
			print(i-1)
			break

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

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

print(ans)

Solution (Python):
A_B = input()
A_B_list = A_B.split(" ")

A = int(A_B_list[0])
B = int(A_B_list[1])

socket = 1
result = 0










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

Solution (Python):



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

kuti = 1
cnt = 0

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

print(cnt)

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

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

print(ans)

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

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

Solution (Python):


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

result = 1
socket = a
if b == 1:
    result = 0
else:
    result = 1

if socket < b:
    for i in range(20):
        socket += a-1
        result += 1
        if socket >= b:
            break
print(result)

Solution (Python):
import math
N,M=list(map(int,input().split()))
if M==1:
    print(0)
    exit()
M-=N

if M<1:
    print(1)
    
else:
    print(1+math.ceil(M/(N-1)))

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

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

print(result)

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

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

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

k = A

if B == 1:
    i = 0
else:
    i = 1

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

print(i)

Solution (Python):

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

Solution (Python):
s,t = map(int,(input().split()))
x = 0
sum = 1
while 1:
  if sum >= t:
    print(x);exit()
  sum += s - 1
  x += 1

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

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

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

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

Solution (Python):
import sys

AB = list(map(int, input().split()))

if AB[1] == 1:
    print(0)
    sys.exit(0)

b = AB[1] - AB[0]

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

c = b // (AB[0]-1)

if b % (AB[0]-1) != 0:
    print(c+2)
else:
    print(c+1)

Solution (Python):


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

if __name__ == "__main__":
    main()

Solution (Python):
import sys
stdin = sys.stdin
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

a, b = na()
if b ==1:
        print(0)
elif (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())
i = 0

while True:
    if B == 1 :
        print("0")
        break
    elif (A - 1) * i + A >= B:
        print(i + 1)
        break
    i += 1

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

Solution (Python):
import math

a,b=list(map(int,input().split()))
l=[1]*a
f=1
s=0
if(b<2):
    print(0)
    exit()
else:
    s=1
while(f==1):
    for i in range(0,a):
        if(sum(l)>=b):
            f=0
            break
        else:
            l[i]=l[i]-1+a
            s=s+1
        
print(s)

Solution (Python):
import math
n,m=input().split()
n=int(n)
m=int(m)
cnt=0
cnt=math.ceil((m-n)/(n-1))
print(cnt+1)

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

print(q)

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

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

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

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

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

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

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

def inq(x, n):
    if B == 1:
        return 0
    if B <= x:
        return n
    return inq(x + A-1, n+1)

print(inq(A, 1))

Solution (Python):
S = str(input())
vals = S.split(' ')
A = int(vals[0])
B = int(vals[1])
total = A
n = 0
while (A + (A - 1) * (n - 1)) < B:
    n += 1
    
print("%d"% n)

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

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

flg=True
ans=0
while flg:
    if 1+(a-1)*ans >= b:
        flg=False
        print(ans)
    else :
        ans+=1

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

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

print(count)

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

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

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

l = 0
if(b == 1):
    print(0)
else:
    c = a + 1
    l += 1
    while(c < b):
        c += a
        l+=1
    print(l)

Solution (Python):
a=input().split(" ")
A=int(a[0])
B=int(a[1])
b=(B-1)//(A-1)
if (B-1)%(A-1)!=0:
    b+=1
print(b)

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

mod = (b - 1) % (a - 1)
rslt = int((b - 1) / (a - 1))

if mod ==  0 :
  print(rslt)
else:
  print(rslt + 1)

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

print(taps)

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

x = 1
c = 0
while (b > x) :
    x = x + (a-1)
    c += 1


print(c)

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

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

Solution (Python):


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

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