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())
def calc(m,B, i):
    if (i*(m-1) >= B-1):
        return i
    return calc(m,B, i+1)
print(calc(a,b,i=0))

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

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

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

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

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

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

print(ans)

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

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

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

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

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

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

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

print(ans)

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

Solution (Python):

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

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

consent = 1
ans = 0

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
n = [int(i) for i in input().split()]
m = 1
ans = 0
while m < n[1]:
  ans += 1
  m += n[0]-1
print(ans)

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

Solution (Python):
A,B = [int(i) for i in input().split()]
if B == 1:
    print(0)
    exit()
c = 0
while True:
    B -= A
    c += 1
    if B <= 0:
        print(c)
        break
    B += 1

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

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

Solution (Python):
import sys
import math
def IL(): return map(int,sys.stdin.readline().rstrip().split())

def Main():
    a,b = IL()
    print(math.ceil((b-1)/(a-1)))
    return

if __name__=='__main__':
    Main()

Solution (Python):
import sys
import math

def main():

    input = sys.stdin.readline

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

if __name__ == "__main__":
    main()

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

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

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

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

tap_num = 1
count = 0
while tap_num < B:

  
  tap_num -= 1
  tap_num += A
  count += 1

print(count)

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

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

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

s=A
i=1
while True:
    if B==1:
        print(0)
        break
    elif A==B:
        print(1)
        break

    elif s>=B:
        print(i)
        break
    s+=A-1
    i+=1

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

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

print(i)

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

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

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

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

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

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

print(i)

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

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

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

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

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

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

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

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

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

Solution (Python):
if __name__ == "__main__":
    A, B = list(map(int, input().split()))
    num_of_tap = 0
    num_of_hole = 1
    while(num_of_hole < B):
        num_of_tap += 1
        num_of_hole = (A-1)*(num_of_tap-1) + A

    print(num_of_tap)

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

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

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

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

print(ans)

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

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

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

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

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

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

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

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

Solution (Python):
import sys
import heapq
import math
import fractions
import bisect
import itertools
from collections import Counter
from collections import deque
from operator import itemgetter
def input(): return sys.stdin.readline().strip()
def mp(): return map(int,input().split())
def lmp(): return list(map(int,input().split()))

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

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

Solution (Python):
from math import ceil

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

Solution (Python):
from math import ceil

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

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

print(cnt)

Solution (Python):
from math import ceil

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

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

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

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

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

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

if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    while kuchi < b:
        kuchi = kuchi - 1 + a
        
        ans += 1
    print(ans)
    
    
if __name__ == "__main__":
    main()

Solution (Python):

import sys, re
from collections import deque, defaultdict, Counter, OrderedDict
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, log
from heapq import heappush, heappop, heapify, nlargest, nsmallest
def STR(): return list(input())
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def list2d(a, b, c): return [[c] * b for i in range(a)]
def sortListWithIndex(listOfTuples, idx):   return (sorted(listOfTuples, key=lambda x: x[idx]))
def sortDictWithVal(passedDic):
    temp = sorted(passedDic.items(), key=lambda kv: (kv[1], kv[0]))
    toret = {}
    for tup in temp:
        toret[tup[0]] = tup[1]
    return toret
def sortDictWithKey(passedDic):
    return dict(OrderedDict(sorted(passedDic.items())))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

a,b = MAP()
if(b==1):
    ans = 0
else:
    
    if(a>=b):
        ans = 1
    else:
        left = b - a
        ans = ceil(left/(a-1)) + 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())


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

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())
cur=1

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

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

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

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


if __name__ == '__main__':
    resolve()

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


if __name__ == '__main__':
    resolve()

Solution (Python):


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

print("{}".format(-x))

Solution (Python):


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

print("{}".format(-x))

Solution (Python):


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

print("{}".format(-x))

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

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

tap = 1
ans = 0
for i in range(0, 100):
    if tap >= b:
        ans = i
        break
    tap -= 1
    tap += a
    

print(ans)

Solution (Python):
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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

    return


if __name__ == '__main__':
    main()

Solution (Python):
import math

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

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

print(result)

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

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

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

print(tap)

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

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

Solution (Python):

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

if __name__ ==  "__main__":
    main()

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

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

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

i=1
tappu=a

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

print(i)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    A, B = [int(x) for x in input().split()]
    a = 1

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

    print(ans)
    
    

if __name__ == '__main__':
    main()

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




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

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

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

Solution (Python):
import math

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

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

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

Solution (Python):


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

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

print(ans)

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

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

d, m = divmod(b-1, a-1)

print(d + bool(m))

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

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

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

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

def sum_tap_num(tap_num, A, B):
	tap_sum = (tap_num-1)*(A-1)+A
	if tap_sum >= B:
		return tap_num
  	
	return sum_tap_num(tap_num+1, A, B)
if B==1:
	print(0)
else:
	print(sum_tap_num(1, A, B))

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

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

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

    print(ans)
    
        


if __name__ == "__main__":
    main()

Solution (Python):
mod=10**9+7
import math
import sys
from collections import deque
import heapq
import copy
import itertools
from itertools import permutations
from itertools import combinations
import bisect
def mi() : return map(int,sys.stdin.readline().split())
def ii() : return int(sys.stdin.readline().rstrip())
def i() : return sys.stdin.readline().rstrip()

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

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

def sum_tap_num(tap_num, A, B):
	tap_sum = (tap_num-1)*(A-1)+A
	if tap_sum >= B:
		return tap_num
  	
	return sum_tap_num(tap_num+1, A, B)
if B==1:
	print(0)
else:
	print(sum_tap_num(1, A, B))

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

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

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

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

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

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

Solution (Python):
inp1, inp2 = map(int, input().split())
if inp2 == 1:
    print(0)
elif inp1 >= inp2:
    print(1)
else:
    print((inp2-2)//(inp1-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())
current = 1
ans = 0

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

print(ans)

Solution (Python):
a,b=map(int,input().split())
num=1
ans=0
while(1):
    if num>=b:
        print(ans)
        exit()
    num-=1
    num+=a
    ans+=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())
print(ceil((b-1)/(a-1)))

Solution (Python):
import math

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

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

print(temp)

Solution (Python):
import math

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

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

print(temp)

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

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

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

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):
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())
i = 1
r = a
if b == 1:
  print(0)
  exit()
while True:
  if r >= b:
    print(i)
    break
  else:
    r = (a - i) + a * i
    i += 1

Solution (Python):
import math
a=input()
res=[i for i in a.split()]
x,y=[res[i] for i in (0,1)]
A,B=int(x),int(y)
if 2<=A<=20 and 1<=B<=20:
    w=(B-1)/(A-1)
    z=math.ceil(w)
    print(z)

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

Solution (Python):
a, b = [int(i) for i in input().split()]
if b == 1:
    print(0)
    exit()
n = int((b-2) / (a-1))
print(n+1)

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

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

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

if calc % 1 == 0:
    print(int(calc))
else:
    print(int(calc) + 1)

Solution (Python):
a,b = (int(x) for x in input().split())
count = 0
result = 0

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

print(count-1)

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

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

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

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

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

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

Solution (Python):
import math


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

Solution (Python):
import sys

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

Solution (Python):
from sys import stdin
A, B= [int(x) for x in stdin.readline().rstrip().split()]


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

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


if __name__ == '__main__':
    solve()

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

ans = 0
consent = 1

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

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

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

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

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

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

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

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

if B==1:
    print(0)
else:
    B = max(B-A,0)
    print(mp.ceil(B/(A-1))+1)

Solution (Python):
def main():
    import copy
    a, b = map(int, input().split())
    
    ans = 0
    outlet = 1
    while outlet < b:
        outlet = outlet - 1
        outlet = outlet + a
        ans = ans + 1
    
    print(ans)
    

main()

Solution (Python):



import math

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

if __name__ == '__main__':
    main()

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

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

print(c)

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

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

print(n)

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):
import math
a,b=map(int,input().strip().split())
ans=0
sockets=1
while sockets<b:
  sockets-=1
  sockets+=a
  ans+=1
print(ans)

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

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
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):
N,K=map(int,input().split())
if ((K-1) % (N-1)) == 0:
  print((K-1)//(N-1))
else:
  print((K-1)//(N-1)+1)

Solution (Python):
def main(A, B):
    if B == 1:
        return 0
    N = 1
    while A + (A-1)*(N-1) < B:
        N += 1
    return N


if __name__ == "__main__":
    A, B = map(int, input().split())
    ans = main(A, B)
    print(ans)

Solution (Python):
import sys, math
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

A, B = rl()

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