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

left = b - a
cnt = 1
while left > 0:
    left -= a - 1
    cnt += 1

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

Solution (Python):

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

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

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

print(math.ceil(ans))

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

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

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

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

print(ans)

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

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

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

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 = [int(v) for v in input().split()]

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

print(ans)

Solution (Python):

"""
Created on Sun Sep  1 20:21:49 2019

@author: Yamazaki Kenichi
"""

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

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

print(ans)

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

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

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

Solution (Python):
import math
import collections
import heapq
from collections import defaultdict
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)


def main():
    a, b = map(int, input().split())
    ans = 0
    k = 1
    while True:
        if k >= b:
            break
        k += a - 1
        ans += 1
    print(ans)


if __name__ == '__main__':
    main()

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

i = 0
j = 1
while j < B:
    j += (A-1)
    i += 1

print(i)

Solution (Python):



def solve(A, B):
    one = A - 1
    total = B - 1
    return (total+one-1) // one


if __name__ == '__main__':
    A, B = map(int, input().split())

    ans = solve(A, B)

    print(ans)

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

Solution (Python):

"""
AtCoder A
"""

import sys, math, random
import numpy as np








inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LLS(): return [list(sys.stdin.readline().rstrip()) for _ in sys.stdin.readlines()]
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()
    out=1
    num=A
    if B<=1:
        print("0")
        exit()
    while num<B:
        num+=(A-1)
        out+=1
    print(out)


if __name__ == "__main__":
    main()

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

count = 0
result = 1

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

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

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

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

def main():
    A,B = map(int,input().split())
    print((B-1+A-2)//(A-1))
    
if __name__ == "__main__":
    main()

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

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

Solution (Python):


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

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

print(count)

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

Solution (Python):
import math

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

A -= 1
B -= 1

ans = B/A

print(math.ceil(ans))

Solution (Python):
import sys
import collections
import copy
q = 1
A,B = map(int,input().split())
ans = 0
while B > q:
    q += A-1
    ans += 1
print(ans)

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

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

count = 1
ans = 0

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

Solution (Python):
import sys
import math
from copy import deepcopy
from collections import deque, defaultdict
from operator import mul
from functools import reduce
sys.setrecursionlimit(20000000)




def main():
    n, m = map(int, input().split())

    concent = 1
    count = 0
    while concent < m:
        concent += n - 1
        count += 1

    print(count)


if __name__ == '__main__':
    main()

Solution (Python):


def main():
    A, B = map( int, input().split())
    ans = 0
    if B == 1:
        print(0)
        return
    for i in range(30):
        if A*i - (i-1) >= B:
            print(i)
            break
    
if __name__ == '__main__':
    main()

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

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

outlet = 1
ans = 0

while outlet < B:
    outlet += 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())
count = 0
mouth = 1
while mouth < B:
    mouth = mouth-1 + 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 = [int(i) for i in input().split()]
b-=1
c=0
while b>0:
    b-=a-1
    c+=1
print(c)

Solution (Python):
import sys
from collections import defaultdict
from heapq import *
sys.setrecursionlimit(10**8)

input = sys.stdin.readline

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

if __name__ == '__main__':
    main()

Solution (Python):

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

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

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

Solution (Python):


import sys
import math

a,b= [ int(x)-1 for x in sys.stdin.readline().split() ]
print( math.ceil(b/a) )

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

n = 1
i = 0
while n < B:
    i += 1
    n += A-1

print(i)

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

result = 0
plug = 1

while(1):
  if plug >= B: break
  plug += (A-1)
  result += 1

print(result)

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

if (b - 1) / (a - 1) == (b - 1) // (a - 1):
    print((b - 1) // (a - 1))
else:
    print((b - 1) // (a - 1) + 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())

ans = 0

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


now = 1

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

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

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

Solution (Python):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
mod = 10**9+7
Max = sys.maxsize
def l(): 
    return list(map(int,input().split()))
def m(): 
    return map(int,input().split())
def onem(): 
    return int(input())
def s(x): 
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): 
    return " ".join(map(str,x))
def max2(x): 
    return max(map(max,x))
def In(x,a): 
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False


n,m = m()
k = 1
co = 0
while k < m:
    k = k-1 + n
    co += 1 
print(co)

Solution (Python):


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

output = 1
now = A
while now < B:
    output += 1
    now += A - 1

if B == 1:
    output = 0

print(output)

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

Solution (Python):

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

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

ans = 0

now = 1

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

print(ans)

Solution (Python):
a = [int(s) for s in input().split(" ")]
A = a[0]
B = a[1]

count = 1
num = 0

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

print(num)

Solution (Python):
import math

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

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

Solution (Python):
import sys
import math
a,b = [int(i) for i in sys.stdin.readline().split()]
if b == 1:
    print(0)
else:
    print(math.ceil((b-1) / (a-1)))

Solution (Python):
A,B = list(map(int,input().split()))
N = 100
for i in range(N):
	if B <= i*(A-1)+1:
		print(i)
		exit()

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

while B > out:
    out += A - 1
    ans += 1

print(ans)

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

plug = 1
ans = 0

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

print(ans)

Solution (Python):
inpl = lambda: list(map(int,input().split()))
A, B = inpl()
print((B-1)//(A-1) + int((B-1)%(A-1) > 0))

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

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

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

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

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

Solution (Python):
import math

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

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

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

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

Solution (Python):

import math
A,B = map(int,input().split())
now = 1
for i in range(50):
    if now < B:
        now+=(A-1)
    else:
        print(i)
        break

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

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

Solution (Python):




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


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

ans = cnt


print(ans)

Solution (Python):


import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

A, B = MAP()

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

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

print(ans)

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

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

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

print(ans)

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

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

Solution (Python):
import math

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

hole = 1
ans = 0
for i in range(500):
    if hole >= B:
        print(i)
        break

    hole +=(A -1)

Solution (Python):
import math
import queue

mod = 1e9+7

def swap(a,b):
    return (b,a)

def gcd(a,b):
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

def divisors(a):
    divisors = []
    for i in range(1,int(a**0.5)+1):
        if a%i==0:
            divisors.append(i)
            if i!=a//i:
                divisors.append(a//i)
    return divisors

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

if __name__ == '__main__':
    main()

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)

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

print(ans)

Solution (Python):
import math
a, b = [int(item) for item in input().split()]
if b == 1:
    print(0)
    exit()

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

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

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

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

print(cnt)

Solution (Python):

import sys, math


def solve(A: int, B: int):
    print(math.ceil((B-1)/(A-1)))
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)

if __name__ == '__main__':
    main()

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

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

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

current = 1
ans = 0

while current < b:
    current -= 1
    current += 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())
for i in range(30):
  if (a-1)*i + 1 >= b:
    print(i)
    exit()

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

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

print(output)

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

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

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


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

Solution (Python):
A,B=(int(x) for x in input().split())
c=0
kuti=1
for n in range(30):
    if n==0:
        if B==1:
            break
    else:
        kuti+=A-1
        c+=1
        if kuti>=B:
            break
print(c)

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

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

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

while True:
    if current >= b:
        break

    current += a - 1
    ans += 1

print(ans)

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

Solution (Python):
import sys
input = sys.stdin.readline
A, B = map(int, input().split())
ans = 0
plug = 1
while plug < B:
	plug -= 1
	plug += A
	ans += 1
print(ans)

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

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

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

hole = 1
c = 0
for i in range(10000):
  if hole >= B:
    break
  
  hole += A - 1
  c += 1

print(c)

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

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

sys.setrecursionlimit(10**7)
inf=10**20
mod=10**9+7
dd=[(-1,0),(0,1),(1,0),(0,-1)]
ddn=[(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-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 I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return input()

def main():
  a,b=LI()
  c=1
  ans=0
  while True:
    if c>=b:
      return ans
    ans+=1
    c-=1
    c+=a


print(main())

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

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

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

print(cnt)

Solution (Python):
import math

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

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

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

print(ans)

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

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

Solution (Python):
import sys

def input(): return sys.stdin.readline()[:-1]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def MATINT(h): return [list(map(int, input().split())) for _ in range(h)]
def MATSTR(h): return [input() for _ in range(h)]
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
inf = float('inf')
mod = 10 ** 9 + 7

def main():
    A, B = MAP()
    A -= 1
    B -= 1
    print(ceil(B / A, 1))

if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]

def code():
    a,b = map(int,input().split(' '))
    ans = 0
    p = 1
    while True:
        if b<=p:
            break
        ans += 1
        p += (a-1)
    print(ans)

if __name__=='__main__':
    code()

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

if b == 1:
    print(0)
elif a >= b:
    print(1)
else:
    t = 1
    b -= a
    for i in range(100):
        t += 1
        b -= (a-1)
        if b <= 0:
            print(t)
            break

Solution (Python):
import sys

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

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

main()

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

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

print(int(res))

Solution (Python):

import copy
import random
import bisect 
import fractions 
import math
import sys
import bisect

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

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

A,B = LI()
now = 1
ans = 0
while now < B:
    now += (A - 1)
    ans += 1

print(ans)

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

def main():
    A,B = map(int, input().split())
    n = 0
    while True:
        if 1 + (A-1)*n >= B:
            break
        n += 1
    print(n)

if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

F = 1
cnt = 0

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

print(cnt)

Solution (Python):
A,B = list(map(lambda x: int(x),input().split()))
cur=1
for i in range(1,21):
    if B==1:
        print(0)
        break
    cur += (A-1)
    if cur >= B:
        print(i)
        break

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

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

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

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

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

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

Solution (Python):

from math import ceil
A, B = map(int, input().split())
ans = 0
socket = 1
while socket < B:
    socket += A - 1
    ans += 1
    if socket >= B:
        break
print(ans)

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

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

Solution (Python):

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

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

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

Solution (Python):
import sys
import math

sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return list(map(int, sys.stdin.readline().split()))
def II(): return int(sys.stdin.readline())
def LS(): return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]

def main():
    a, b = LI()
    print(math.ceil((b-1)/(a-1)))

if __name__ == '__main__':
    main()

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

count=0
check=0
co=1
while check==0:

    if B<=co:
        check=1
    else:
        co=co+(A-1)
        count+=1

print(count)

Solution (Python):
class Solution:
    def main(self):
        A, B = map(int, input().split())
        i = 0
        while 1 + (A-1) * i < B:
            i += 1
        print(i)

if __name__ == '__main__':
    Solution().main()

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

num = 1

taps = 0

while num < B:
  num -= 1
  num += A
  taps += 1

print(taps)

Solution (Python):

from math import ceil
def solve():
    A, B = map(int, input().split())
    res = ceil((B-1)/(A-1))
    return str(res)

if __name__ == '__main__':
    print(solve())

Solution (Python):
import sys
from heapq import heappop, heappush
from operator import itemgetter
from collections import deque, defaultdict, Counter
from bisect import bisect_left, bisect_right
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
MOD = 10**9 + 7
INF = float('inf')

def sol():
    A, B = map(int, input().split())

    if B == 1:
        print(0)
        return

    now = 1
    for i in range(1, 1000):
        now += A - 1
        if now >= B:
            print(i)
            return


sol()

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

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

Solution (Python):
import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque

from itertools import product

from itertools import permutations

from itertools import combinations

from itertools import accumulate
from bisect import bisect_left, bisect_right
from heapq import heappush, heappop

import re




import sys
sys.setrecursionlimit(10**9)

def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
 
def i_inpl(): return int(input())
def l_inpl(): return list(map(int, input().split()))
def line_inpl(x): return [i_inpl() for _ in range(x)]

INF = int(1e30)
MOD = int(1e9)+7 


def create_grid(H, W, value = 0):
    return [[ value for _ in range(W)] for _ in range(H)]



def main():
    A, B = l_inpl()
    ans = 0
    cnt = 1
    while True:
        if cnt >= B:
            break
        cnt -= 1
        cnt += A
        ans += 1
    print(ans)
if __name__ == "__main__":
    main()

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

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

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

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

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

Solution (Python):
import itertools


def solve(a, b):
    if b == 1:
        return 0
    cur_num = 1
    for i in itertools.count(1):
        cur_num += a - 1
        if cur_num >= b:
            return i


def main():
    a, b = (int(z) for z in input().split())
    res = solve(a, b)
    print(res)


if __name__ == "__main__":
    main()

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

Solution (Python):

import sys


def solve(A: int, B: int):
    x = 1
    count = 0
    while (x < B):
        x += A - 1
        count += 1
    print(count)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)

if __name__ == '__main__':
    main()

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
out = 1
while(out < B):
  out = out - 1 + A
  ans += 1
print(ans)

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

print(ans)

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

ans = 1
count = A

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

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

print(ans)

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

ans = 0

if b > a:
    b -= a
    ans = 1
    while b > 0:
        b -= a-1
        ans += 1
elif b > 1:
    ans = 1

print(ans)

Solution (Python):
"""
N = int(input())
A, B = map(int,input().split())
lst = [list(map(int,input().split())) for i in range(M)]
A = list(map(int,input().split()))
"""

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

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

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

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

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

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

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

print(math.ceil(b/a))

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

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

print(count)

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

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

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

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

cnt = 0
res = 1

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

Solution (Python):
import math
def main():
    a,b = map(int,input().split())

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

if __name__ =="__main__":
    main()

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

print(count)

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

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

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

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

a -= 1
c = 1
cnt = 0
while b > c:
    c += a
    cnt += 1

print(cnt)

Solution (Python):
def InputToInt():
    A = input().split()
    for i in range(len(A)):
        A[i] = int(A[i])
    return A
    
if __name__ == '__main__':
    A, B = InputToInt()
    print((B-2)//(A-1)+1)

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

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

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

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]
a,b=map(int,input().split())
tmp=1
i=0
while b>tmp:
    tmp+=(a-1)
    i+=1
print(i)

Solution (Python):
import math

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

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