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

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

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

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

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

if b == 1:
  print(0)
  exit()
  
elif a >= b:
  print(1)
  exit()

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

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

Solution (Python):

"""
B - Power Socket
https://atcoder.jp/contests/abc139/tasks/abc139_b

"""
import sys


def solve(A, B):
    total = 1
    used = 0
    while total < B:
        total += (A - 1)
        used += 1
    return used


def main(args):
    A, B = map(int, input().split())
    ans = solve(A, B)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

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

print(ans)

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

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

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

print(ans)

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

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

print(ans)

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

if B != 1:
	count, sum = 1, A
	while sum < B:
		sum += A - 1
		count += 1
else:
	count = 0

print(count)

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

res = 0
cnt = 1
while True:
  if cnt >= B:
    break
  else:
    cnt += (A-1)
    res += 1

print(res)

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

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

Solution (Python):

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

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


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

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

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

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

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

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

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

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

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

Solution (Python):

import math

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

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

Solution (Python):


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

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

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

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

print(ans)

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

Solution (Python):

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

socket = 1
count = 0
while(True):
    if socket >= b:
        break
    count += 1
    socket += (a - 1)


print(count)

Solution (Python):

import math
a,b=map(int,input().split())
out=1
ans=0
while out<b:
    out-=1
    out+=a
    ans+=1
print(ans)

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

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

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

Solution (Python):

import sys



def solve(A: int, B: int):
    print(-(-(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):
import sys
import os
import math


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    A, B = list(map(int, sys.stdin.readline().split()))
    print(math.ceil((B - A) / (A - 1)) + 1)


if __name__ == '__main__':
    main()

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

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

Solution (Python):
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

A, B = map(int, input().split())
print((B - 1 + A - 2) // (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):
    print(0)
elif((B-1)%(A-1) == 0):
    print((B-1)//(A-1))
else:
    print(B//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):
A, B = map(int, input().split())
ans = 0

for i in range(1, 100):
    if A + (A-1)*(i-1)>=B:
        ans = i
        break

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

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

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

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

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

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

Solution (Python):
import math
def solve():
    N, M = map(int, input().split())
    return math.ceil((M-1)/(N-1))

print(solve())

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

n = 1
cnt = 0

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

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

Solution (Python):
import sys

[A, B] = [int(x) for x in sys.stdin.readline().strip().split(" ")]

current = 1
result = 0
while current < B:
    result += 1
    current += A - 1

print(result)

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

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

print(cnt)

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

div, mod = divmod(B - A, A - 1)
div += 1
if mod > 0:
    div += 1
print(div)

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

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

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

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

Solution (Python):

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

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

print(ans)

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

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

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

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

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

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

Solution (Python):
A, B = map(int, input().split())
syou,amari = divmod((B - 1),(A - 1))
if amari != 0:
  syou = syou + 1

print(syou)

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

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

for n in range(0,20):
    if n*(a-1)>=b-1:
        break

print(n)

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

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

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

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


tap = 1
num = 0
while 1:
    if tap >= B:
        print(num)
        break
    tap += A - 1
    num += 1

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

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

a -= 1
c = 1

count = 0

while c < b:
    count += 1
    c += a

print(count)

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

if A == B:
    print('1')
    
elif B == 1:
    print('0')
    
else:
    AAA = 1
    C = 0
    
    while B > AAA:
        AAA = AAA + A - 1
        C += 1
        
    print(C)

Solution (Python):
number = input().split(" ")
A = int(number[0])
B = int(number[1])
if B == 1:
    print(0)
elif A >= B:
    print(1)
else:
    x = (B-A)//(A-1)
    y = (B-A)%(A-1)
    if y == 0:
        print(x+1)
    else:
        print(x+2)

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

Solution (Python):
N , M = (map(int , input().split()))
ana = 1
count = 0
while ana < M:
    ana = ana + N-1
    count += 1
print(count)

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())
 
p=1
res=0
 
while p<B:
  p=p-1+A
  res+=1
  
print(res)

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

cnt = 0
p = 1

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

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

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

Solution (Python):
N, H = map(int, input().split())
import math

print(math.ceil((H-1)/(N-1)))

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



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

Solution (Python):
import math

input_1,input_2=map(int,input().split())
print (math.ceil((input_2-1)/(input_1-1)))

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

print(ans)

Solution (Python):
from sys import stdin

a, b = [int(x) for x in stdin.readline().rstrip().split()]

total = 1
count = 0
while total < b:
    total += a - 1
    count += 1

print(count)

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

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

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

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

i = -1
while 1:
  i += 1
  if (A-1)*i + 1 >= B:
    print(i)
    quit()

Solution (Python):

a, b = map(int, input().split())
cnt = 0
power = 1

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

if a > b:
    print(1)
    exit()

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

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

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

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

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

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

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

Solution (Python):
import math

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

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

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

Solution (Python):
import math




import sys

ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)

def main():
    a, b = list(map(int,ipti().split()))
    print(math.ceil(((b-1)/(a-1))))

if __name__ == '__main__':
    main()

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

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

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

print(count)

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

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

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

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

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

ans = 0
flag = True
while flag:
  ans += 1
  if b <= (ans-1)*(a-1) + a:
    flag = False

print(ans)

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

tap=0
while tap*kuchi-(tap-1)<total:
  tap+=1

print(tap)

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

print(count)

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

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

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

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

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

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

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

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

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

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

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

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

x = 1
y = 0
while x < b:
  x += a - 1
  y += 1

print(y)

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

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

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

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

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
printV = lambda x: print(*x, sep="\n")
printH = lambda x: print(" ".join(map(str,x)))
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

def main():
	a,b = MI()
	n = (b-a)/(a-1)
	if(b==1):print(0)
	elif(a>b):print(1)
	elif(n%1==0):print(int(n)+1)
	else:print(int(n)+2)

if __name__ == '__main__':
	main()

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

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

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

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

Solution (Python):



from math import ceil

def main():
  a, b = map(int, input().strip().split())
  print(ceil((b - 1) / (a - 1)))

if __name__=='__main__':
  main()

Solution (Python):
import numpy as np
from functools import reduce
from operator import add,sub,mul,truediv
from fractions import gcd

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


ans = 1
x = a

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

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

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

ans = 0   
out = 1 


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

print(ans)

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

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

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

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

Solution (Python):

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

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

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

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

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

Solution (Python):
import math

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

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

print(ans)

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

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

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

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

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

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

Solution (Python):
import sys

a, b = map(int, sys.stdin.readline().split())

def main():
    cur = 1
    cnt = 0
    while cur < b:
        cnt += 1
        cur += a - 1
    return cnt

if __name__ == '__main__':
    ans = main()
    print(ans)

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

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

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

p=1
res=0

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

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

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

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

cnt = 0
unused = 1
while unused < b:
    unused -= 1
    unused += a
    cnt += 1

print(cnt)

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

cnt = 0
d = 1
while True:
    if d >= B:
        break
    else:
        d -= 1

    cnt += 1
    d += A


print(cnt)

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

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

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

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

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

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

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

Solution (Python):



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

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

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

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

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

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

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

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

Solution (Python):




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


if __name__ == "__main__":
    main()

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

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

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

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

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

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

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

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

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

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

Solution (Python):


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

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

print(count)

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

A, B = MAP()

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

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

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

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

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

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

Solution (Python):
A,B=map(int,input().split())
C=1
if B==1:
    Ans=0
else:
    for i in range(20):
        D=C+(A-1)*(i+1)
        if D>=B:
            Ans=i+1
            break
        else:
            pass

print(Ans)

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

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

i = 1
ans = 0

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

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

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

x = 1
tap = 0

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

print(tap)

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

Solution (Python):
def solve():
    N, M = map(int, input().split())

    if M == 1:
        return 0
    
    
    diff = N-1
    sum = N
    c = 1
    while sum < M:
        sum += diff
        c += 1
    return c

print(solve())

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

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

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

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

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

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

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

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

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


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

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

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

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

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


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

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

print(ans)

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

print(soc)

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

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

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

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

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

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

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

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

total = 1
answer = 0
while True:
    if total < B:
        total += A-1
        answer += 1
    else:
        break

print(answer)

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

n = sum(1 for _ in range(1, B, A - 1))
print(n)

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

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

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

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

result=1
count=0
while result < b:
    result += a-1
    count += 1

print(count)

Solution (Python):
x = input().split()
A, B = int(x[0]), int(x[1])
n = 1
t = 0
while n < B:
  n += A - 1
  t += 1
print(t)

Solution (Python):
import math
a, b = map(int, input().split())
tap = 1
count = 0
while tap < b:
    tap += -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 = map(int,input().split())
c = 1
count = 0
while  c < b:
    c += a-1
    count += 1

print(count)

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

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

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

Solution (Python):
import math
A,B=input().split()
a=int(A)
b=int(B)
print(math.ceil((b-a)/(a-1))+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())

ans=0
if b!=1:
    b-=a
    ans=1
    while b>0:
        b-=(a-1)
        ans+=1
print(ans)

Solution (Python):
import sys

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

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

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

Solution (Python):
from math import ceil

def solve(a, b):
    return ceil((b - 1) / (a - 1))

_a, _b = map(int, input().split())
print(solve(_a, _b))

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