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

ans = 0
plug=1

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

print(ans)

Solution (Python):
a,b = (int(i) for i in input().split())
if b == 1:
    print(0)
    exit()
tap = 0
ans = 0
while True:
    tap += a
    ans += 1
    if tap >= b: break
    tap -= 1
print(ans)

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

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

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

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




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

Solution (Python):
TS = input().split()
T = int(TS[0])
S = int(TS[1])

count = 0
soket = 1

while(soket < S):
  soket = soket -1 + T
  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(int(ceil((b - 1) / (a - 1))))

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:
      print(i+1)
      break

Solution (Python):
import sys

A,B=map(int, sys.stdin.readline().split())
tap=0
sockets=1
while(sockets < B):
  tap +=1
  sockets=(A-1)*tap +1

print(tap)

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

needed = b - 1



plug = needed // (a-1)

if needed % (a-1) != 0:
    plug += 1

print(plug)

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

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

if B == 1:
    print(0)
else:
    total = 1
    B -= A

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

Solution (Python):
import math

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

main()

Solution (Python):
if __name__ == '__main__':
    a,b = map(int, input().split())

    plug_no = 1

    answer = 0
    while(True):
        if plug_no >= b:
            break
        answer += 1
        plug_no += (a-1)

    print(answer)

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

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

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

print(ans)

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

Solution (Python):



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

if b == 1:
    print(0)
elif b < a:
    print(1)
else:
    n = ceil((b-a) / (a-1)) + 1
    print(n)

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

print(count)

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

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

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

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

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

print(cnt)

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

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

Solution (Python):
def makelist(n, m):
    return [[0 for _ in range(m)] for _ in range(n)]

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

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

Solution (Python):

import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = False
def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]
    import math
    A,B = LMIIS()
    print(math.ceil((B-A)/(A-1))+1)



if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

print(ans)

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

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

if b == 1:
    print(0)
else:
    x = (b-1)/(a-1)
    print(math.ceil(x))

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

increas = A -1
plugin = 1

i = 0
while True:
    if plugin >= B:
        break
    i += 1
    plugin += increas

print(i)

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

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

amari = (b - 1) % (a - 1)
syo = (b - 1) // (a - 1)

if amari == 0:
    print(syo)
else:
    print(syo + 1)

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

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

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

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

print(ans)

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

count = 0
if B == 1:
    count = 0
else:
    while B > 0:
        B -= A
        count += 1
        if B > 0:
            B += 1

print(count)

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

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

r = 0

rest_b = b - a

r += 1

if rest_b <= 0:
    print(r)
    exit(0)


while 0 < rest_b:
    rest_b -= a - 1
    r += 1

print(r)

Solution (Python):
import sys
from pprint import pprint

def solve(a, b):
    ans = 0
    emp = 1
    while emp < b:
        emp += a - 1
        ans += 1
    print(ans)

if __name__ == '__main__':
  a, b = map(int, sys.stdin.readline().strip().split(" "))
  solve(a, b)

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

if b == 1:
  print(0)
else:
  taps, anum = a, 1
  while taps < b:
    anum += 1
    taps = taps - 1 + a  
  print(anum)

Solution (Python):


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

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

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

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

Solution (Python):

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

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

count = 1
n = 1
while count < consent:
    count = n * tap - (n-1)
    n += 1

print(n-1)

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

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

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

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

Solution (Python):
a,b = [int(s) for s in input().split()]
p = 0
count = 1

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

Solution (Python):


import math


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

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

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

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

print(ans)

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

power_strip = 0
slot = 1

while slot < b:
    power_strip += 1
    slot += a-1

print(power_strip)

Solution (Python):
import math

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

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

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

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())
if B == 1: print(0)
elif B <= A: print(1)
else:
    B -= A
    print(ceil(B / (A - 1)) + 1)

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

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

Solution (Python):
A,B = map(int,input().split())
c = 0
ana = 0
if B == 1 :
    print("0")
    exit()
for i in range(1000):
    if i == 0:
        c+= 1
        ana += A
    else:
        c+= 1
        ana += A-1
    if ana >= B:
        break
print(c)

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


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())
for i in range(200):
    if a*i-i+1 >= b:
        print(i)
        break

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

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

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

ans = 0
tmp = 1
while B > tmp:
    ans += 1
    tmp = tmp + A - 1

print(ans)

Solution (Python):

import sys


def solve(A: int, B: int):
    res = 0
    if B == 1:
        res = 0
    elif B <= A:
        res = 1
    else:
        B -= A
        res = 1
        res += B // (A-1)
        if B % (A-1) > 0:
            res += 1
    
    print(res)
        

    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 = input().split(' ')
A, B = int(A), int(B)

num_sockets = 1
count = 0

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

print(count)

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

a = A
c = 1
while(1):

    if B == 1:
        c = 0
        break

    if a >= B:
        break

    a = a + A - 1
    c += 1

print(c)

Solution (Python):
A,B = map(int,input().split(' '))
if B == 1:
	print(0)
	exit()

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

print(i+1)

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

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

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

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

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

Solution (Python):


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

cnt = 0

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

if B > 1:
    B -= A
    cnt += 1
    while B > 0:
        cnt += 1
        B -= A-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())
print(str((B-2) // (A-1)+1))

Solution (Python):
import math

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

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

print(math.ceil(N))

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

num_plugs = 1;
for i in range(25):
    if num_plugs < B:
        num_plugs += A-1
    else:
        print(i)
        break

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

ans = 1
cnt = 0
while True:
  if ans >= b:
    break
  else:
    ans += 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
S = 1
while S<B:
    ans+=1
    S += A-1
print(ans)

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

ret = 0
tap = 1
while(True):

  if tap >= b:
    break
  tap += a - 1
  ret += 1
print(ret)

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

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

print(i)

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

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

Solution (Python):
import numpy as np

AB=input().split()

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

count=1

T=B-A

count=T/(A-1)+count

print(int(np.ceil(count)))

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

res = 0
X = 1
while X < B:
    X += A - 1
    res += 1

print(res)

Solution (Python):
import sys
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()))

counter = 0
N = 1
A,B = MAP()

while N<B:
    N -= 1
    N+= A
    counter+=1

print(counter)

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



d, m = divmod(b - 1, a - 1)
if m > 0:
	d += 1
print d

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

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

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

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

while 1:
    ans += 1
    c += a - 1
    if c >= b:
        print(ans)
        exit()

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

Solution (Python):
def solve(S, T):
    count = 0
    for s, t in zip(S, T):
        count += (s == t)
    return count


if __name__ == '__main__':
    A, B = map(int, input().split())
    answer = -(-(B - 1) // (A - 1))
    print(answer)

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

ret = 0
tap = 1
while(True):

  if tap >= b:
    break
  tap += a - 1
  ret += 1
print(ret)

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

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

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

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

print(ans)

Solution (Python):


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

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

print(cnt)

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

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

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

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

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

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

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

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

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

Solution (Python):
a,b=list(map(int,input().split()))
k=0
n=1

while n < b:
    k += 1
    n = n+a-1

print(k)

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

ans = 0
count = 1

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

print(ans)

Solution (Python):
import math

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

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

print(ret)

Solution (Python):
AB = input().split(' ')
A = int(AB[0])
B = int(AB[1])

init_num = 1

count = 0
flag = True

while flag:
    if init_num >= B:
        flag = False
        continue
    init_num += (A -1)
    count += 1
print(count)

Solution (Python):
from sys import stdin

if __name__ == '__main__':
    A, B = [ int(x) for x in stdin.readline().rstrip().split() ]
    num_of_tup = 0
    total_plugs = 1
    while True:
        if total_plugs >= B:
            break
        else:
            total_plugs = total_plugs - 1 + A
            num_of_tup += 1
    print(num_of_tup)

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

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


if __name__ == "__main__":
    main()

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

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

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

Solution (Python):
import sys

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    [A, B] = string_to_int(inputs[0])

    count = 0
    i = 0
    if B == 1:
        return 0
    while count < B:
        if i != 0:
            count -= 1

        count += A

        i += 1
    return i


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

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

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

Solution (Python):

A,B=map(int,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):
import sys

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

ava = 1
count = 0

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

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

print(count)

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

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

count = 0
ans = 0

for i in range(1000):
    if count + 1 < B:
        count += A-1
        ans += 1
    else:
        break

print(ans)

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

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

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

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

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

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


if __name__ == '__main__':
    main()

Solution (Python):
import math

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

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

Solution (Python):

import sys
a,b = map(int,input().split())
ans = 0
tap = 1
if(b==1):
    print(0)
    sys.exit()
while(1):
    tap += a-1
    ans+=1
    if(tap>=b):
        print(ans)
        break

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

Solution (Python):




 
from collections import* 
from fractions import gcd
from functools import* 
from itertools import* 
from operator import mul,itemgetter
from bisect import* 
from heapq import* 
from math import factorial,pi
from copy import deepcopy
import sys
sys.setrecursionlimit(10**8)

 
def main():
    a,b=map(int,input().split())
    if b>1:
        if b<=a:
            print(1)
        else:
            b-=a
            print((b-1)//(a-1)+2)
    else:
        print(0)
if __name__ == '__main__':
    main()

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())
if B == 1:
    print(0)
    exit()
ans = 1
count = A
while True:
    if count >= B:
        break
    ans += 1
    count += (A - 1)
print(ans)

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

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

N = 1
count = 0
while(N<B):
    N+=A
    N-=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 = list(map(int, input().split()))

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

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

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

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

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

n = 1
ans = 0
while n < B:

  n += A-1
  ans += 1
print (ans)

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

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

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

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):
import math
A, B = map(int, input().split())

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

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

dengen = 1
count = 0

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

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

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

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

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

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

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

Solution (Python):

from sys import stdin
import math




def _li(): return list(map(int, stdin.readline().split()))
def _li_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def _lf(): return list(map(float, stdin.readline().split()))
def _ls(): return stdin.readline().split()
def _i(): return int(stdin.readline())
def _f(): return float(stdin.readline())
def _s(): return stdin.readline()[:-1]


A, B = _li()

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

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

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

print(ans)

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

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

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

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

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

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

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

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

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

A=AB[0]
B=AB[1]
plug=1
count=0

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

print(count)

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

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

Solution (Python):

def ceil(x, y):
    if x%y == 0:
        return x//y
    else:
        return x//y + 1

a, b = map(int, input().split())
c = b
if b <= a:
    ans = 1
else:
    ans = 0
    b -= a
    ans += 1
    ans += ceil(b,a-1)

if c == 1:
    ans = 0

print(ans)

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

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

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

tap = 1
count = 0

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

print(count)

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

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

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

Solution (Python):
import math
a,b = (int(_) for _ in input().split())
print(math.ceil((b-1)/(a-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
sys.setrecursionlimit(1000000)
from math import factorial, ceil, floor
from bisect import bisect_right as bsr
from operator import itemgetter as ig
from collections import defaultdict as dd
from collections import deque, Counter as cnt


args = None
INF = float("inf")
MOD = int(1e9 + 7)
def input(*ps):
    if type(ps[0]) is list:
        return [input(*ps[0][:-1]) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]
def nlist(n, v):
    if not n: return [] if type(v) is list else v
    return [nlist(n[1:], v) for _ in range(n[0])]


def main():
    A, B = input(int, int)

    cur, c = 1, 0
    while cur < B:
        cur = cur - 1 + A
        c += 1
        if B <= cur:
            break
    print(c)

if __name__ == '__main__':
    args = iter(sys.stdin.read().split())
    main()

Solution (Python):
from sys import stdin

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

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

input = lambda: stdin.readline()[:-1]
main()

Solution (Python):


import sys, math

s2nn = lambda s: [int(c) for c in s.split(' ')]
ss2nn = lambda ss: [int(s) for s in list(ss)]
ss2nnn = lambda ss: [s2nn(s) for s in list(ss)]
i2s = lambda: sys.stdin.readline().rstrip()
i2n = lambda: int(i2s())
i2nn = lambda: s2nn(i2s())
ii2ss = lambda n: [i2s() for _ in range(n)]
ii2nn = lambda n: ss2nn(ii2ss(n))
ii2nnn = lambda n: ss2nnn(ii2ss(n))

def main():
    A, B = i2nn()
    print(math.ceil((B - 1) / (A - 1)))
    return

main()

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

Solution (Python):
kuchi,need=map(int,input().split())

c = 0
c_kuchi = 1
while True:
    if c_kuchi >= need:
        break
    else:
        c += 1
        c_kuchi -= 1
        c_kuchi += kuchi
print(c)

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

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

cnt = 1

s = A

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

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

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

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

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

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

Solution (Python):
from math import log, ceil, floor

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

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

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

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

    ans += 1

print(ans)

Solution (Python):
import sys

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

    if b == 1:
        print(0)
        return

    ans = 1
    b -= a

    tmp = (b) // (a-1)
    if (b % (a-1)) > 0:
        tmp += 1

    print(ans + tmp)

if __name__ == "__main__":
    resolve()