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

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

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


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

Solution (Python):
n = list(map(int, input().split(' ')))
sum = n[1]
cnt = 1
if n[1]==1:
    cnt = 0
else:
    for i in range(1,40):
        sum = sum - n[0]
        if sum <= 0 :
            break
        else:
            sum += 1
        cnt += 1
print(cnt)

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


A_new = A
if B == 1:
    count = 0    
else:
    count = 1
    while A_new <= B:
        if A_new == B:
            break
        else:
            A_new = A_new-1
            A_new += A
            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())
print(((b - 1) + (a - 2)) // (a - 1))

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

ans = 0
t = 1

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

print(ans)

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

Solution (Python):
input_AB = input()
AB = input_AB.split(" ")
A = int(AB[0])
B = int(AB[1])
ans = 0
outlet = 1
while outlet < B:
  outlet = outlet - 1
  outlet = outlet + A
  ans = ans + 1
print(ans)

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

ans = 0
out = 1

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

print(ans)

Solution (Python):
A = input().split()
count = 1
a = int(A[0])
b = int(A[1])
c = a

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

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

Solution (Python):










A, B = [int(i) for i in input().split(" ")]
total = A
ans = 1
while True:
   if B <= total: break
   ans += 1
   total += A  -1
if B == 1:  print(0)
else: print(ans)

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

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

print(ans)

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

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

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

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))

sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

a, b = MAP()
ans = 0



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


while(1):

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

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

ans = 0
out = 1

while(out < B):
  out -= 1
  out += A
  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())
print((b-1+a-2)//(a-1))

Solution (Python):
import math
def A():
    a = input()
    b = input()
    ans = 0
    for i in range(3):
        if a[i] == b[i]:
            ans += 1
    print(ans)

def B():
    temp = [int(i) for i in input().split()]
    a = int(temp[0])
    b = int(temp[1])
    ans = 0
    t = 1
    while (t<b):
        ans += 1
        t += (a-1)
    print(ans)

def C():
    n = int(input())
    nums = [int(i) for i in input().split()]
    start_index = 0
    end_index = 1
    max_len = 0
    le = 0
    while (end_index < len(nums)):
        if nums[end_index] <= nums[end_index-1]:
            le += 1
        else:
            max_len = max(le, max_len)
            start_index = end_index
            le = 0
        end_index += 1
    max_len = max(le, max_len)
    print(max_len)

def D():
    n = int(input())
    
    
    
    
    
    

    
    
    ans = n*(n-1)//2
    print(ans)

B()

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

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

Solution (Python):
import sys

stdin = sys.stdin
na = lambda: map(int, stdin.readline().split())
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())

def main():
  a, b = na()
  
  tmp = 1
  cnt = 0
  while tmp < b:
    tmp += a-1
    cnt += 1
  print(cnt)

main()

Solution (Python):


import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)


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

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

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

count = 2
B -= (A-1)
while True:
    if A >= B:
        print(count)
        exit()

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

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

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

out = 1
n = 0
while b > out:
  out += a-1
  n +=1
print(n)

Solution (Python):
import copy
A, B = list(map(int, input().split()))
C = copy.copy(A)
if B == 1:
    print(0)
    exit()
count = 1
while A < B:
    A += C - 1
    count += 1
print(count)

Solution (Python):

a,b = map(int, raw_input().split())
tmp = a

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

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

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

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

Solution (Python):


l,r = map(int, raw_input().split())
if r == 1 :
	print 0
	exit()
ans = 0
count = 0
while count < r:
	count += l - (1 if ans >0 else 0)
	ans +=1
print ans

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

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

for n in range(0,21):
    if n * X[0] - (n-1) >= X[1]:
        print(n)
        break

Solution (Python):
A,B=map(int,input().split())
M=A
a=1
if B==1:
  print(0)
else:
  for i in range(19):
    if M>=B:
      print(a)
      break
    a+=1
    M+=A-1

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

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


v = 1
count = 0

a = A - 1

if v == B:
    print("0")
    exit()

count = (B - 1) // a
amari = (B - 1) % a
if amari > 0:
    count += 1

print(count)

Solution (Python):
def main():
    A, B = [int(x) for x in input().split()]
    if B == 1:
        print(0)
        return
    count = 1
    B -= A
    while B > 0:
        B -= (A - 1)
        count += 1
    print (count)

if __name__ == "__main__":
    main()

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

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

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

Solution (Python):


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

un = A
ans = 1

while True:
    if B <= un:
        break

    un = (un - 1) + A
    ans += 1

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

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

Solution (Python):
import sys
a,b=map(int, input().split())
hole = a
if b==1:
	print(0)
	sys.exit()
for i in range(1,30):
    if hole<b:
        hole = hole + a -1
    elif hole>=b:
        print(int(i))
        break

Solution (Python):
a = [int(i) for i in input().split()]
ans=0
num=0

while True:
    if a[1]==1:
        break
    if (a[0]-1)*num+a[0] >= a[1]:
        ans = num+1
        break
    num += 1
print(ans)

Solution (Python):
a, b = (int(x) for x in input().split())
plus_a = a - 1

ans = 1

if b == 1:
  ans = 0
else:
  while a < b:
    ans += 1
    
    a += plus_a


print(ans)

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

checker = True

if b==1:
    print(0)
    checker = False

if checker and a >= b:
    print(1)
    checker = False

    
counter = 1
tmp = a

while checker:
    tmp += a-1
    if tmp >= b:
        checker = False
        counter += 1
        print(counter)
    else:
        counter += 1

Solution (Python):
po=list(map(int,input().split()))
A=po[0]
B=po[1]
C=po[0]-1
ans=1
if B == 1:
    ans=0
else:
    while A < B:
        ans=ans+1
        A=A+C
print(ans)

Solution (Python):

P, Q = map(int, input().split())
if Q == 1:
    print(0)
    exit(0)

count = 1
a = P
while a < Q:
    a += P - 1
    count += 1
print(count)

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

Solution (Python):
import math

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

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

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

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

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

if B == 1:
    ans = 0
else:
    ans = 1
    while x < B:
        x -= 1
        x += A
        ans += 1

print(ans)

Solution (Python):
tmp = input().split()
A = int(tmp[0])
B = int(tmp[1])
if B == 1:
    print(0)
    exit()
if 2 <= A and A <= 20:
    if 1 <= B and B <= 20:

        power = 1
        count = 0

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

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

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

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

if A[1] == 1:
  print(0)
  exit()
elif A[1] <= A[0]:
  print(1)
  exit()

import math  
N = math.ceil((A[1]-1) / (A[0]-1))
print(N)

Solution (Python):

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

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

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

flag = True
if(b==1):
    print(0)
    flag=False

sasi = a;
answer = 1;

if(flag==True):
    while(sasi < b):
        sasi = sasi + a - 1;
        answer += 1;
    print(answer)

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

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

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

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

Solution (Python):
import math

S = list(input().split())

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

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

print(math.ceil(C))

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

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

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

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

Solution (Python):
import math
a , b = map(int, input().split(" "))
c = 0
ans = 0
if(b == 1):
    print(0)
else:
    for i in range(0, 50):
        if(i == 0):
            c = c + a
            ans = ans + 1
        else:
            c = c + a - 1
            ans = ans + 1
        if(c >= b):
            break
    print(ans)

Solution (Python):
import math

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

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

print(int(count + 1))

Solution (Python):
A,B=map(int,input().split())
if B==1:
    ans=0
elif 1<B and B<=A:
    ans=1
else :
    for k in range(2,100):
        if (k-1)*A-(k-2)<B and B<=k*A-(k-1):
            ans=k
        else:
            k=k+1
print(ans)

Solution (Python):
import sys
num = list(input().split(" "))
a = int(num[0])
b = int(num[1])
if b == 1:
  print(0)
  sys.exit()

count = 1

while True:
  if count == 1:
  	plug = a
  else:
    plug = plug + (a - 1) 
  if plug >= b:
    break
  count += 1

print(count)

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

if B == 1:
    print(0)
    exit(0)
n = 0
x = 1
while(1):
    if x >= B:
        print(n)
        exit(0)
    else:
        x += A - 1
        n += 1

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

Solution (Python):
A, B = input().split()
A = int(A)
B = int(B)
out = int((B-1)/(A-1))
if B > out*(A-1)+1:
  out += 1
print(out)

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

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

print(cnt)

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

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

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

Solution (Python):
a, b = map(int, input().split())
if (a == b):
    print(1)
elif ((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())
 
ans = 1
tmp = a
if(b == 1):
  print(0)
elif (a >= b):
    print(ans)
else:
    while True:
        a += (tmp - 1)
        ans += 1
        if a >= b:
            print(ans)
            break

Solution (Python):
A,B=input().split()
tap=0
plug=1


for i in range(int(B)*3):
    if plug >= int(B):
       break
    plug+=int(A)-1
    tap+=1





print(int(tap))

Solution (Python):
def solve():
    A,B = map(int, input().split())
    num = 1
    tap = A
    if B == 1:
        print(0)
        return
    
    while tap < B:
        num += 1
        tap += (A-1)
    print(num)
    
solve()

Solution (Python):
import math

inputs = list(map(lambda i: float(i), input().split()))
A, B = inputs[0], inputs[1]

if B == 1:
    taps = 0
elif A > B:
    taps = 1
else:
    taps = math.ceil((B-A)/(A-1)) + 1

print(taps)

Solution (Python):
import math

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

i = 0
if B<=1:
    N = 0
    all_hole = B+1
else:
    N = 0
    hole = [1]
    all_hole = sum(hole)

while all_hole < B:
    hole[i] = A
    all_hole = sum(hole)
    if hole[-1] == A:
        i = 0
        hole = [1]*all_hole
    else:
        i += 1
    N += 1

print(N)

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

ans = 0

if B == 1 :
	print(0)

elif B <= A :
	print(1)

elif (B-A)%(A-1) <= 0 :
	ans = (B-A)//(A-1)+1
	print(ans)
elif (B-A)%(A-1) >= 1 :
	ans = (B-A)//(A-1)+2
	print(ans)

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

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

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

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

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

Solution (Python):


def main():

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

   if B ==1:
      print(0)
      exit()
   
   if A >= B:
      print(1)
      exit()
   
   increase = A -1
   count = A
   ans = 1

   while(count < B):
      count += increase
      ans += 1

   print(ans)
      

if __name__== "__main__":
    main()

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

Solution (Python):
import math

while True:
    try:
        A, B = map(int, input().split())
        print(math.ceil((B-A) / (A-1)) + 1)
    except:
        break

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




sub = b - a

if sub % (a-1) == 0:
    ans = sub // (a-1)
else:
    ans = sub // (a-1) + 1

print(ans + 1)

Solution (Python):

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

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

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

x = 1






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

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

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

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

slot = 1
count = 0

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

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

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

if b==1:
    print(0)
elif a>=b:
    print(1)
else:
    while 1:
        an+=(a-1)
        t+=1
        if an>=b:
            print(t)
            exit()

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

if A<2 or A>20 or B<1 or B>20:
	exit()

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

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

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

if tap[1] <= 1:
    print(0)
elif tap[0] >= tap[1]:
    print(1)
else:
    num = tap[0]
    inc = tap[0] - 1
    cnt = 1

    while True:
        num += inc
        cnt += 1

        if num >= tap[1]:
            break

    print(cnt)

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

print(n)

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




print(c)

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

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

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

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

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

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

s = A
ans = 1
if B == 1:
  ans -= 1
elif A >= B:
  """
  None
  """
else:
  while s < B:
    s += A - 1
    ans += 1
print(ans)

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

Solution (Python):

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

current = a
counter = 1
remain = a
if b == 1:
    print(0)
else:
    while current < b:
        current -= 1
        current += a
        counter += 1
    print(counter)

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

Solution (Python):

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

current = a
counter = 1
remain = a
if b == 1:
    print(0)
else:
    while current < b:
        current -= 1
        current += a
        counter += 1
    print(counter)

Solution (Python):
I = input().split()
A = int(I[0])
B = int(I[1])
ana = 0
i = 0
while(True):
  if B == 1:
    break
  if i == 0:
  	ana += A
  else:
    ana += (A-1)
  i += 1
  if ana >= B:
    break
print(i)

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

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

socket = A
sum_socket = A
tap = 1
while sum_socket < B:
    sum_socket = sum_socket - 1 + socket
    tap += 1
if B == 1:
    tap = 0
print(tap)

Solution (Python):

mod = 1000000007
ii = lambda :  int(input())
si = lambda :  input()
dgl = lambda : list(map(int, input()))
f = lambda :   map(int, input().split())
il = lambda :  list(map(int, input().split()))
it = lambda :  tuple(map(int, input().split()))
ls = lambda :  list(input())
a, b=f()
c=1
if b==1:
    print(0)
    exit()
while a*c-c+1 < b:
    c += 1
print(c)

Solution (Python):
A,B=[int(n) for n in input().split()]
i=0
if B!=1:
    while B > 0:
        if i==0:
            B -= A
        else:
            B -= (A-1)
        i += 1
print(i)

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

print(ans)

Solution (Python):
a, b = map(int, input().split())
total = 0
if b == 1:
    print(0)
    exit()
for i in range(1, 30):
    if i == 1:
        total = a
    else:
        total += (a - 1)

    if total >= b:
        print(i)
        exit()

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

a = input_data[0]
b = input_data[1]

ans = 0

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

print(ans)

Solution (Python):
input_char = input()
a = int(input_char.split()[0])
b = int(input_char.split()[1])
unused_tap = 1
count = 0

while(1):
    if unused_tap >= b:
        print(count)
        break
    
    unused_tap = unused_tap-1 + a 
    count += 1

Solution (Python):
import sys
s = input().split()
tapp_in= int(s[0])
nouse_tapp= int(s[1])
i=0
while nouse_tapp > (tapp_in-1)*i+1:
    i+=1
print(i)

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

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

print(count)

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

Solution (Python):
import sys
A, B = [int(x) for x in input().split()]
 
cnt = 1
N = A
 
if B==1:
  print(0)
  sys.exit()
 
for i in range(0, B):
  if N >= B:
    print(cnt)
    break
  else:
    cnt+=1
    N+=(A-1)

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

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

Solution (Python):
import math

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

if B == 1:
    print(0)
elif A >= B:
    print(1)
else:
    print(1 + math.ceil((B-A)/(A-1)))

Solution (Python):
a = []
a = input().split()

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

tap = 1

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

if B == 1 :
  tap = 0

print(tap)

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

count = 1

if(B>1):
    a = A
    while(A<B):
        A -= 1
        A += a
        count += 1
        pass
else:
    count = 0
    pass


print(count)

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

Solution (Python):
import sys
a, b = map(int,input().split())
sum = a
count = 1
if b == 1:
        print(0)
else:
        for i in range(10000):
                if sum < b:
                        sum += (a-1)
                        count += 1
                else:
                        break
        print(count)

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

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

count = a
if count >= b:
    print(1)
else:
    ans = 2
    while True:
        count += (a - 1)
        if count >= b:
            print(ans)
            break
        ans += 1

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

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

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

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

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

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

Solution (Python):
n=[int(i) for i in input().split()]
a=n[0]
b=n[1]
if(a==b):
  print("1")
elif(b==1):
  print("0")
else:
  count=0
  i=0
  while(count!=b):
    i+=1
    if((count+a)>=b):
      count+=a
      print(i)
      break
    else:
      count+=a-1

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

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

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

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

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

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

Solution (Python):
in_data = input()
 
data = in_data.split(' ')
A = int(data[0])
B = int(data[1])
if B == 1:
  print("0")
else:
  c = (B - 1) // (A - 1)
  d = (B - 1) / (A - 1)
  if c < d:
    c = c + 1
  print(c)

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

Solution (Python):
A, B = [int(st) for st in input().split()]
def count_tap(a, b):
    taps = 0
    if b == 1:
        return taps
    else:
        taps = 1
        if a >= b:
            return taps
        else:
            taps = 1 + (b-a) // (a-1)
        if (b - a)%(a-1) != 0:
            taps += 1
    return taps
  
  
print(count_tap(A, B))

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

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

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

Solution (Python):
A, B = [int(i) for i in input().split()]
print((B-1)//(A-1) + ((B-1)%(A-1)!=0))

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

if C % (A-1) == 0:
  print(C//(A-1)+1)
elif C % (A-1) != 0 :
  print(C//(A-1)+2)

Solution (Python):
import math
a,b=(int(c) for c in input().split())
y=[]
for i in range(b):
  if i*(a-1)+1>=b:
    y.append(i)
print(y[0])

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

Solution (Python):



from sys import stdin
import math


int_list  = [int(x) for x in stdin.readline().rstrip().split()]

A = int_list[0]
B = int_list[1]

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

print(cnt)

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

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

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

t = 1
c = 0
while True:
    if t<B:
        t = (t-1)+A
        c += 1
    else:
        break

print(c)

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

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

print(c)

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

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

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

amari = (B-1)%(A-1)

if amari == 0:
    ans = (B-1)/(A-1)
else:
    ans = (B-1)//(A-1) + 1

ans2 = int(ans)

print(ans2)

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

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

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

for i in range(1, 30):
    if cnt * A - cnt + 1 >= B :
        break
    else :
        cnt +=1

if B == 1:
    cnt = 0

print(cnt)

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

r = 1
i = 0
while True:
    if b == 1:
        print(0)
        break
    elif r < b:
        i +=1
        r = r - 1 + a 

    elif r >= b:
        print(i)
        break

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

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

i=0
all_in=1
while(all_in<b):
    all_in=all_in+a-1
    i+=1

print(i)

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

ct = 1
asum = a
while True:
    if asum<b:
        asum = asum+a-1
        ct+=1
    else:
        break
if b >=2:
    print(ct)
else:
    print(0)