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 math
A,B = map(int,input().split())
print(math.ceil((B-1)/(A-1)))

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

print(cnt)

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

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

s=0

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

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

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

cur = 1
ans = 0

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

print(ans)

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

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

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

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

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

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

if B == 1:
    print(0)
    sys.exit(0)
cnt = 1
while True:
    if A*cnt+1-cnt >= B:
        break
    cnt += 1

print(cnt)

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

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

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

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


print(count)

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

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

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

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

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

    num += 1

  print(num)

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

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

print(i)

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



def calc(a, b):
    ans_list = [a]
    add_tap = a
    
    
    if b == 1:
        print(0)
    else:      
        for i in range(19):
            add_tap += a-1
            ans_list.append(add_tap)

        for i, value in enumerate(ans_list):
            if value >= b:
                print(i+1)
                break
            
calc(a, b)

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

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

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

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

Solution (Python):
from sys import stdin

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


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

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

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

  print(count)

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

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

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

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


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

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

for n in range(20):
  if plg>=B:
    print(tap)
    exit()
  else:
    plg+=A-1
    tap+=1
    
print(tap)

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

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

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

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

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

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

print(cnt)

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

for i in range(100):
    if 1 + (A-1) * i >= B: break
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())
if b==1:
    print(0)
elif b <=a:
    print(1)
elif b > a and (b - 1)%(a - 1)== 0:
    print((b - 1)// (a - 1))
elif b > a and (b - 1)%(a - 1)!= 0:
    print((b - 1)//(a - 1)+ 1)

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

if B <= 1:
    print(0)

elif A >= B:
    print(1)

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

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

Solution (Python):
import math

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

while True:
    for e in range(s):
        c += 1
        s = s - 1 + a
        if s >= b:
            print(c)
            break
    else:
        continue
    break

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

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

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

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

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

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

print(i)

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

Solution (Python):
def solve():
    a, b = map(int, input().split())
    if b == 1:
        print(0)
        exit()

    x = 1
    y = a * 1
    while y < b:
        y += a - 1
        x += 1
    print(x)


solve()

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

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

Solution (Python):

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

count = 0
total_plug = 1
for i in range(1,B):
    count += 1
    total_plug += (A - 1)
    if B <= total_plug:
        break
        
print(count)

Solution (Python):

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

count = 0
total_plug = 1
for i in range(1,B):
    count += 1
    total_plug += (A - 1)
    if B <= total_plug:
        break
        
print(count)

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

num = 1
res = 0

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

print(res)

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

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

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

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

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

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

print(res)

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

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

Solution (Python):
A=list(map(int,input().split()))
a=A[0]
b=A[1]
count=0
i=1
while i<b:
    count=count+1
    i=i+a-1
print(count)

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

x = 1 
count = 0 

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

print(count)

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

Solution (Python):
import math

A, B = input().split(' ')

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

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

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

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

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

print(count)

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

ans = 0
start = 1
for i in range(21):
    if start >= b:
        ans = i
        break
    start -= 1
    start += a

print(ans)

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

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

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




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

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

count=0

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

print(count)

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

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

Solution (Python):






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

if (b == 1):
    print(0)
    exit()
ans = 0
for i in range(1,1000000000):
    if (i == 1):
        b -= a
    else:
        b -= (a-1)
    ans += 1
    if (b <= 0):
        break
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())

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

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

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

Solution (Python):


def main():

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

    ans = 0

    while True:
        num = (A - 1) * ans + 1
        if num >= B:
            break
        
        ans += 1

    print(ans)


if __name__ == "__main__":
    main()

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

ref = 1

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

print(ans)

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

main()

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

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

Solution (Python):
import heapq
t = 1
def max(a,b):
	if a > b:
		return a
	return b
def min(a,b):
	if a < b:
		return a
	return b

while t > 0:
	t -= 1
	a,b = map(int,input().split())
	i = 1
	c = a
	if b == 1:
		print(0)
		exit(0)
	while a < b:
		if(i == 0):
			a = a+(c)
		else:
			a = a+(c-1)
		i += 1
	print(i)

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

sasikomi = 1
tap = 0

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

print(tap)

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

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

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

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

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









sum_tap = 1

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

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

    print(counter)

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









sum_tap = 1

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

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

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

print(cnt)

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

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

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

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

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

print(res)

Solution (Python):
















































global FLAG_LOG
FLAG_LOG = False


def log(value):
    
    
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    
    
    A, B = list(map(int, lines[0].split()))
    
    
    
    
    
    
    
    

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

    return [result]



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['4 10']
        lines_export = [3]
    if pattern == 2:
        lines_input = ['8 9']
        lines_export = [2]
    if pattern == 3:
        lines_input = ['8 8']
        lines_export = [1]
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode



def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    
    
    
    
    
    
    
    
    
    
    



if __name__ == '__main__':
    main()

Solution (Python):
def solve(a,b):
  def needTaps(a,b,holes=1,res=0):
    if holes >= b:
      return res
    else:
      return needTaps(a,b,holes+a-1,res+1)
    
  return needTaps(a,b)

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

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

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

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

print(res)

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

ans = 0
taps = 1

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

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

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

Solution (Python):
import math


def resolve():
    import sys
    input = sys.stdin.readline
    row = [int(x) for x in input().rstrip().split(" ")]
    a = row[0]
    b = row[1]

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




if __name__ == "__main__":
    resolve()

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

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

Solution (Python):
num = list(input().split()) 
a = int(num[0])
b = int(num[1])
ans = 0
tap = 1
while b > tap:
    tap += a-1
    ans += 1

print(ans)

Solution (Python):
"""ワット数に気を付けましょう"""
A,B=map(int,input().split())
ans=0
now=1
while now<B:
  ans+=1
  now+=A-1
print(ans)

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

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

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

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

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

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

  print(i)

Solution (Python):
A, B = map(int, input().split())
q, r = divmod(B - 1, A - 1)
print(q + (r > 0))

Solution (Python):


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

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

print(ans)

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

Solution (Python):
def main():
    A,B = [int(x) for x in input().split()]
    ans = 0
    p = 1
    while p<B:
        p += A-1
        ans += 1
    print(ans)

if __name__ == '__main__':
    main()

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

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

print(ans)

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

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

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

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

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

cnt = 1
ans = 0

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

Solution (Python):
import sys
import math

A,B = map(int,input().split())
if not ( 2 <= A <= 20 and 1 <= B <= 20 ): sys.exit()

if B == 1: print(0);sys.exit()
for I in range(math.ceil(B/A),21):
    if I*A-(I-1) >= B:
        print(I)
        sys.exit()

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

Solution (Python):
import math

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

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

if B == 1:
    print(0)
else:
    socks = 1
    taps = 0
    while socks < B:
        socks -= 1
        socks += A
        taps += 1
    print(taps)

Solution (Python):
import sys
import math
from collections import deque


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


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

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


if __name__ == "__main__":
    main()

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

socket = 1 
number = 0

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

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

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

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

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

print(ans)

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

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

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

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

Solution (Python):

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

socket = 1
tap_cnt = 0

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

    tap_cnt += 1

print(tap_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(int, input().split())

socket = 1
cnt_A = 0
while socket < B:
    socket += A-1
    cnt_A += 1

print(cnt_A)

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 = [int(i) for i in input().split()]
result = 1
require_socket = B - A

result += require_socket // (A - 1)
if (require_socket / (A - 1)).is_integer() is False:
    result += 1

print(result)

Solution (Python):
A, B = map(int, input().split())
import math
c = math.ceil((B - A) / (A - 1))
print(c + 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)
  exit(0)
  
sumA = A
if sumA >= B:
  print(1)
  exit(0)

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

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

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

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

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

if B == 1:
    print(0)
else:
    while socket_count <= B:
        if socket_count == B:
            break
        else:
            socket_count += (A - 1)
            result += 1
    print(result)

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

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

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

Solution (Python):

def input2():
	return map(int,input().split())

a,b=input2()
count=1
if b<=1:
	print(0)
else:
	for i in range(1,21):
		count=count-1+a
		if count>=b:
			print(i)
			break

Solution (Python):
import math

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

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

Solution (Python):
import sys
def main():
    a, b = map(int, input().split())
    k = 1
    cnt = 0

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

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

    print(cnt)


if __name__ == '__main__':
    main()

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


if __name__ == '__main__':
    main()

Solution (Python):

import sys
import re
from collections import deque, defaultdict
from itertools import combinations, combinations_with_replacement
import bisect
from math import factorial, sqrt, log, ceil, floor
sys.setrecursionlimit(1000000)


def main():
    input = sys.stdin.readline
    
    
    

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

    num = 1
    cnt = 0
    while B > num:
        num -= 1
        num += A
        cnt += 1

    print(cnt)


if __name__ == '__main__':
    main()

Solution (Python):
A,B=map(int,input().split())
C=1
D=0
for i in range(50):
  while C<B:
    C+=A-1
    D+=1
print(D)

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


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

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

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

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

print(ans+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())

count = 0
avail = 1

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

print(count)

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

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

N = 0

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

print(N)

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

N = 0

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

print(N)

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

socket = 1
ans = 0

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

print(ans)

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

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

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

    print(ans)

if '__main__' == __name__:
    resolve()

Solution (Python):
import math

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