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

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

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

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

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

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

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

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

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

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

ans = (b - 1) / (a - 1)

print(math.ceil(ans))

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

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

if B==1:
    print(0)

elif A >= B:
    print(1)
elif(2*A-1) >=B:
    print(2)
elif(3*A-2)>=B:
    print(3)
elif(4*A-3)>=B:
    print(4)
elif(5*A-4)>=B:
    print(5)
elif(6*A-5)>=B:
    print(6)
elif(7*A-6)>=B:
    print(7)
elif(8*A-7)>=B:
    print(8)
elif(9*A-8)>=B:
    print(9)
elif(10*A-9)>=B:
    print(10)
elif(11*A-10)>=B:
    print(11)
elif(12*A-11)>=B:
    print(12)
elif(13*A-12)>=B:
    print(13)
elif(14*A-13)>=B:
    print(14)
elif(15*A-14)>=B:
    print(15)
elif(16*A-15)>=B:
    print(16)
elif(17*A-16)>=B:
    print(17)
elif(18*A-17)>=B:
    print(18)
elif(19*A-18)>=B:
    print(19)
elif(20*A-19)>=B:
    print(20)

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

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

B -= A  
A -= 1
 
Cnt = 1
Flag = 0
while Flag == 0:
  B -= A
  Cnt += 1
  if B > 0:
    continue
  else:
    Flag = 1
    break
 
 
print(Cnt)

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

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

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

if (b-1)/(a-1)%1 == 0:
    print((b-1)//(a-1))
    
elif (b-1)/(a-1)%1 != 0:
    print((b-1)//(a-1)+1)

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

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

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

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

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

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

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

def addConcent(concent, all):
    return all - 1 + concent

all = 1
count = 0
while B > all:
    all = addConcent(A, all)
    count += 1

print(count)

Solution (Python):
import sys


		
def main():
	b , c = map(int, input().split())
	if c==1:
		return 0
		
	kuti=b
	kosuu=1
	while kuti < c:
		kosuu+=1
		kuti += b - 1
		
	print(kosuu)
	
	



if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

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

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

if __name__ == '__main__':
	main()

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

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


print(count)

Solution (Python):




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

    if b == 1:
        print(0)
        return

    count = 0
    sum = a
    count += 1
    if sum >= b:
        print(1)
        return

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


if __name__ == "__main__":
    main()

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

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

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

Solution (Python):


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

if __name__ == '__main__':
    main()

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

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

Solution (Python):
import sys

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

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

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

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

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

total = 1
n = 0
while True:
  if B == 1:
    break
  n += 1
  total = 1 + (A - 1) * n
  if total >= B:
    break

print(n)

Solution (Python):
from enum import Enum
from queue import Queue
import collections

import sys
import math

BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001

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

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

Solution (Python):


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

c = a-1
cnt=0
'''
cnt = b // c
if b%c>1:
    cnt+=1
print(cnt)
'''
'''
b-=a
cnt = 1
if b>0:
    while True:
        if b>0:
            b-=c
            cnt+=1
        else:
            break
'''
while True:
    if b>1:
        b-=c
        cnt+=1
    else:
        break
print(cnt)

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

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

Solution (Python):
import math


socket_on_tap, target = map(int, input().split(' '))

print(math.ceil((target - 1) / (socket_on_tap - 1)))
exit(0)

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

Solution (Python):
import sys
sys.setrecursionlimit(1000000000)

a,b=map(int,input().split()[:2])

i=0
while True:

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

Solution (Python):

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

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

outlets = 1
taps = 0
while outlets < b:
    taps += 1
    outlets += a-1

print(taps)

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

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


if B <= 1:
    print(0)
    quit()

if A >= B:
    print(ans)
    quit()

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

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

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

Solution (Python):
a = [int(_) for _ in input().split()]
plug = 1
tap = 0
if len(a) == 2 and 2 <= a[0] <= 20 and 1 <= a[1] <= 20:
    while a[1] > plug:
        plug += a[0] - 1
        tap += 1
    print(tap)
else:
    print('hoge!')

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

i = 0
s = 1
while s < n:
    i += 1
    s = a * i - (i - 1)

print(i)

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

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

if b != 1:
    div = b // (a-1)
    mod = b % (a-1)

    if a != 2:
        if mod <= 1:
            print(div)
        else:
            print(div+1)
    else:
        print(div-1)
else:
    print(0)

Solution (Python):
import sys


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


def main():
    A, B = map(int, input().split())
    if B == 1:
        print("0")
        exit()
    else:
        for i in range(1, 100):
            if (A-1)*(i-1) + A >= B:
                print(i)
                exit()


if __name__ == '__main__':
    main()

Solution (Python):

import math

A, B = map(int, input().split())
ans = 0
x = 0

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

print(ans)

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

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

if B == 1:
    ans = 0

print(ans)

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

n=1

if b == 1:
    n = 0

else:
    for i in range(1000000):
        tap_num = n*(a-1)+1
        if tap_num >= b:
            break
        else:
            n +=1

print(n)

Solution (Python):
def main(): 
    a,b =map(int, input().split())
    i = a -1
    cnt = 1

    while True:
        if a >= b:
            break
        a += i
        cnt += 1

    if(b == 1):
        cnt = 0

    print(cnt)
if __name__ == "__main__":
    main()

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

while (num*A+1) < B:
    num = num+1

print(num)

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

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

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

Solution (Python):
S = input()
L = [int(x.strip()) for x in S.split(' ')]
num = 0
while (L[0]*num - (num - 1) < L[1]):
    num += 1
print(num)

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

if __name__ == '__main__':
    p_b()

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

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

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

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

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

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

print(kotae)

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):
a,b = map(int,input().split())

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

Solution (Python):

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

count = 0
plug = 1

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

print(count)

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

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

print(i)

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

Solution (Python):

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

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

if B < A:
    print(1)
    exit(0)

remain = B - A
count = remain // (A-1)
mod = remain % (A-1)
if not mod == 0:
    count += 1
count += 1
print(count)

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

Solution (Python):

A,B = map(int,input().split())
kuti = 1
kaisu = 0
for i in range(1,1000):
    if i == 1 and B == 1:
        kaisu = 0
        break
    kuti += A-1
    if kuti >= B:
        kaisu = i
        break
print(kaisu)

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

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

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

ans = 0
num = 1
while num < B:
  ans += 1
  num = num + A -1

print(ans)

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

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

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

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

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

print(int(ans))

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

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

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

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

print(c)

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

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

Solution (Python):
ab= list(map(int, input().split())) 
a = ab[0]
b = ab[1]
ans = 0
aaa = 0
for i in range (20):
    ans = (a * i) - (i-1)
    if ans >= b:
        aaa = i
        break
print(i)

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())
ans=-((1-b)//(a-1))

print(ans)

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

Solution (Python):
import math

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

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

Solution (Python):
list1=input().split(" ")
a=1
b=0
while True:
	if a>=int(list1[1]):
		break
	b+=1
	a+=int(list1[0])-1
print(b)

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

if b <= 1:
    ans = 0
elif b <= a:
    ans = 1
else:
    ans = (b+a-3)//(a-1)

print(ans)

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

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

ret = 0
kuti = 1

for i in range(1, 1000):
  if kuti >= B:
    break
    
  ret += 1
  kuti += A-1
  


print(ret)

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

if B >= 2:
    m = 0
    while (A-1) * m + 1 < B:
        m += 1
    print(m)

if B == 1:
    print(0)

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

Solution (Python):
S, T = map(int, open(0).read().split())
result = 0
currentCount = 1
while currentCount < T:
    result += 1
    currentCount += S - 1

print(result)

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

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

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

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

cnt = 0
x = 1

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

print(cnt)

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

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

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

Solution (Python):
a, b = [int(i) for i in input().split()]
 
nums = a-1
now = 1
ans = 0
while(True):
  if b <= now:
    break
  else:
    ans += 1
    now += nums
print(ans)

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

print(kosu)

Solution (Python):
import math

A, B = [int(s) for s in input().split(" ")]
print(math.ceil((B-1)/(A-1)))

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

Solution (Python):


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

result = 0
for i in range(20):
    if (B <= A * i - (i - 1)):
        result = i
        break

print(result)

Solution (Python):
"""
A個口の電源タップをいくつか使って未使用の差込口をB口以上に拡張
A個口の電源タップ1つと未使用の差込口1口を使って、新たに差込口をA口増やすことができます。
"""

data = list(map(int, input().split()))
a = data[0]
b = data[1]

q = (b-a) // (a-1)
mod = (b-a) % (a-1)

ans = 0

if mod == 0:
  ans = q + 1
else:
  ans = q + 2

print(ans)

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

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

if int(B) != 1:
    i = 1
    while i<=100000000:
        if int(B) <= (int(A)-1)*(i-1)+int(A):
            print(i)
            break
        i +=1

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

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

print(ans)

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

Solution (Python):
import sys

A = list(map(int, input().split()))
a, b = A[0], A[1]
kazu = 0
kuti = 1
while True:
    if kuti >= b:
        print(kazu)
        sys.exit()
    kazu += 1
    kuti = kuti - 1 + a

Solution (Python):
import math

A, B = map(lambda x: int(x), input().split(' '))

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

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

total = 1
taps = 0
while total < b:
    total += (a-1)
    taps += 1

print(taps)

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

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

tap = 0
out = 1

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

Solution (Python):



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

count = 0
sum = 1
while sum < B:
    sum += A-1
    count +=1

print(count)

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

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

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

print(i)

Solution (Python):

inputNum = list(map(int, input().split()))
A = inputNum[0]
B = inputNum[1]

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

print(num)

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

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

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

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

count = 0
plug = 1

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

print(count)

Solution (Python):
import sys

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

tap = 0
num = 0

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

while num < B:
  if tap >= 1:
    num -= 1
  tap += 1
  num += A

print(tap)

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline






















def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	A,B = inputMap()

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

	ans = 0
	to = 0
	flg = False
	while True:
		ans += 1
		if flg == False:
			to += A
			flg = True
		else:
			to = (to-1) + A

		if to >= B:
			break

	print(ans)

if __name__ == "__main__":
	main()

Solution (Python):
import math

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

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

Solution (Python):
import math

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

x = (b -a) / (a - 1)

print(math.ceil(x + 1))

Solution (Python):
A,B = map(int, input().split())
if B == 1:
    print(0)
else:
    count = 1
    d = A 

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

    print(count)

Solution (Python):
def MAP(): return map(int,input().split())
import math

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

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

plug, sumPlug = 0, 1
while sumPlug < B:
    sumPlug += A-1
    plug += 1

print(plug)

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

ans = 0

if B != 1:
    for i in range(1,30):
        X = (A-1)*i + 1
        if X >= B:
            ans = i
            break
            
print(ans)

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

if x[1]==1:
	print(0)
else:
	for i in range(1,20):
		if (x[0]-1)*(i-1)+x[0]>=x[1]:
			print(i)
			break

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

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

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

ans = int((b-1)/(a-1)+ int(int((b-1)/(a-1)) != (b-1)/(a-1)))
print(ans)

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


if __name__ == "__main__":
    print((B - 1 + A - 2) // (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())
now = 1
ans = 0
for i in range(10000):
    if now >= B:
        break
    else:
        now += A-1
        ans += 1
print(ans)

Solution (Python):
import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

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

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

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

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

Solution (Python):
import sys


def input(): return sys.stdin.readline().strip()


def solve():
    pass


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

    print(ans)


if __name__ == "__main__":
    main()

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

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

print(count)

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

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline






















def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	A,B = inputMap()

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

	ans = 0
	to = 0
	flg = False
	while True:
		ans += 1
		if flg == False:
			to += A
			flg = True
		else:
			to = (to-1) + A

		if to >= B:
			break

	print(ans)

if __name__ == "__main__":
	main()

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

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

A, B = int(A), int(B)

total = 1
num = 0

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

Solution (Python):
import math

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

Solution (Python):

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

kuti = 1
num = 0

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

print(num)

Solution (Python):
import queue

"""
N = int(input())



A = []
for i in range(N):
	A.append(int(input()))

print(A)

"""


(A,B) = (int(i) for i in input().split(" "))
print(int((B-1+A-2)/(A-1)))

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

if B == 1:
	print(0)
else:
	for i in range(1000000000000):
		gate += A - 1
		if gate >= B:
			break
	print(i + 1)

Solution (Python):

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

Solution (Python):
A, B, = (int(i) for i in input().split())  
from math import ceil,floor


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

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

tap_num = 1
count_num = 0
while tap_num < B:
  tap_num = tap_num + (A - 1)
  count_num = count_num + 1
print(count_num)

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

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

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

Solution (Python):


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

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

ans=1

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

print(ans)

Solution (Python):
N = list(map(int, input().split()))
init = 1
sum = 0

while init < N[1]:
    init += N[0] - 1
    sum += 1

print(sum)

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

Solution (Python):

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

tap = 0
count = 0

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

	print(tap)

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

answer = 0
number = 1

if A < B:
  while number < B:
    number += A-1
    answer += 1
elif A == B:
  answer = 1
elif B == 1:
  answer = 0
else:
  answer = 1

print(answer)

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

ans=1

c=b-a

ans+=(c-1)//(a-1)+1

print(ans)

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

if __name__ == "__main__":
    f_b()

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

for i in range(100):
  if total<b:
    total+=a-1
    count+=1
print(count)

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

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

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

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

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

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

Solution (Python):



import math


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


main()

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

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

print(x)

Solution (Python):

import math

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

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

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

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

n = 0
N = 1

while True:
    if(B <= N):
        break
    N = N + (A - 1)
    n = n + 1

print(n)

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

print(ans)