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

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

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

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

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

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

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

ans = 0
consent = 1

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

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

K = 1
ans = 0

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


print(ans)

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

Solution (Python):

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

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

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

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

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

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

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

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

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

Solution (Python):

 
a,b=list(map(int,input().split()))
 
mouse_tot = 1
mouse_cnt = 0
add_mouse = a-1
 
while mouse_tot <  b:
    mouse_tot += add_mouse
    mouse_cnt += 1
 
if b==0:
    mouse_cnt = 0
 
print(mouse_cnt)

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

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

i = 1
tmp = 1
ans = 1

while b > tmp:
  tmp = a * i - (i-1)
  ans += 1
  i += 1

print(ans-1)

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

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

Solution (Python):

 
a,b=list(map(int,input().split()))
 
mouse_tot = 1
mouse_cnt = 0
add_mouse = a-1
 
while mouse_tot <  b:
    mouse_tot += add_mouse
    mouse_cnt += 1
 
if b==0:
    mouse_cnt = 0
 
print(mouse_cnt)

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

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

print(c)

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

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

print(ans)

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

Solution (Python):
from collections import *
from heapq import *
from itertools import *
from fractions import gcd

from decimal import *
import copy
from bisect import *
import time
import sys
import math
sys.setrecursionlimit(10**7)
A,B=map(int,input().split())
B-=1
count=0
while B>0:
    B-=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):
a, b = map(int, input().split())

t = b - 1
s = a - 1
ans = (t + s - 1) // s
print(ans)

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

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

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

flag = 1

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

Solution (Python):
import sys

input = sys.stdin.readline


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

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


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

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

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

print(cnt)

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

Sum=1
Count=0
while Sum < B:
    Sum=Sum+A-1
    Count+=1

print(Count)

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

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

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



def RD(): return sys.stdin.read()
def II(): return int(input())
def MI(): return map(int,input().split())
def LI(): return list(map(int,input().split()))
def TI(): return tuple(map(int,input().split()))




def main():
	a,b=MI()
	for i in range(100):
		if (a-1)*i+1>=b:
			print(i)
			exit(0)
			
if __name__ == "__main__":
	main()

Solution (Python):
A, B = (int(x) for x in input().split())
C, count = 1, 0
while C < B:
    C += (A - 1)
    count += 1
print(count)

Solution (Python):
import math

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

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

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

Solution (Python):
A,B = map(int,input().split())
def ceil(n): 
    if n > int(n):
        return(int(n)+1)
    else:
        return(int(n))
print(ceil((B-1)/(A-1)))

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

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

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

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

print((s+t-1)//s)

Solution (Python):


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

number = 0

if B == 1:
    count = 0

else:
    number = A
    count = 1

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

print(count)

Solution (Python):


def main():
    A,B = map(int, input().split())
    sasikomi = 1
    tap = 0
    while(True):
        if sasikomi >= B:
            break
        sasikomi += (A-1)
        tap += 1
    print(tap)


if __name__ == "__main__":
    main()

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

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

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

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

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

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

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

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

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

Solution (Python):
import math
a, b = map(int, input().split())
i = 0
s = 1
while b > s:
    s += a-1
    i += 1
print(i)

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

Solution (Python):
import math

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

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

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

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

Solution (Python):
import sys

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

def main():
	a,b = MI()
	if b == 1:
		print(0)
	else:
		ans = 0
		tap = 1
		while True:
			tap += a - 1
			ans += 1
			if b <= tap:
				print(ans)
				break


if __name__ == '__main__':
	main()

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

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):
import sys
input=sys.stdin.readline
a,s=map(int,input().split())
print(1-(-s+a)//(a-1))

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

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

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

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

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

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

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

print(ans)

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

ans = int((B - 1) / (A - 1)) + 1

if (B - 1) % (A - 1) == 0:
    ans -= 1

print(ans)

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

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

print(c)

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

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

Solution (Python):
import sys
input = sys.stdin.readline
import math
import collections
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

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

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

if b == 1:
    print(0)
else:
    cnt = a
    res = 1
    while cnt < b:
        cnt += a - 1
        res +=1
    print(res)

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

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

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

Solution (Python):
import sys

def solve():
    input = sys.stdin.readline
    A, B = map(int, input().split())
    currentOpen = 1
    usedA = 0
    while currentOpen < B:
        currentOpen += A - 1
        usedA += 1
    print(usedA)
    

    return 0

if __name__ == "__main__":
    solve()

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

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

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

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

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

print(ans)

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

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

Solution (Python):


import math


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


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


print(ans)

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

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

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

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

Solution (Python):
from math import ceil


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


if __name__ == '__main__':
    main()

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians, acos, atan, asin, log, log10
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
def debug(*args):
    if debugmode:
        print(*args)
def input(): return sys.stdin.readline().strip()
def STR(): return input()
def INT(): return int(input())
def FLOAT(): return float(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 9)
inf = sys.maxsize
mod = 10 ** 9 + 7
dx = [0, 0, 1, -1, 1, -1, -1, 1]
dy = [1, -1, 0, 0, 1, -1, 1, -1]
debugmode = False

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

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

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

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 = map(int,input().split())
kuti = 1
k = 0
for i in range(100):
    if kuti>=B:
        print(k)
        break
    elif B == 1:
        print(0)
    else:
        kuti += A-1
        k += 1

Solution (Python):
def main():
    A, B = (int(i) for i in input().split())
    print(0--(B-1)//(A-1))


if __name__ == '__main__':
    main()

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

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

Solution (Python):
def main():
    A, B = map(int, input().split())
    answer = 0
    socket = 1

    while(True):
        if socket >= B:
            break
        else:
            answer += 1
            socket += A - 1

    print(answer)


if __name__ == '__main__':
    main()

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

while sashikomi < B:
    sashikomi -= 1
    sashikomi += A
    result += 1

print(result)

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

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

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

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

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

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

ans = 1
temp = A

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

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

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

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

Solution (Python):

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

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

if b == 1:
    print(0)
elif a == b:
    print(1)
else:
    print(k)

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

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

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

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

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

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

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

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

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

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

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())
 
num = (b - 1) // (a - 1)
amari = (b - 1) % (a - 1)
 
if amari == 0:
    print(num)
else:
    print(num + 1)

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

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

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

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

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

ns = lambda:stdin.readline().rstrip()
ni = lambda:int(stdin.readline().rstrip())
nm = lambda:map(int,stdin.readline().split())
nl = lambda:list(map(int,stdin.readline().split()))

A,B=nm()

print(((B-1)//(A-1)+((B-1)%(A-1)>0) if B>1 else 0))

Solution (Python):
import math

inputted = input().split()
A = int(inputted[0])
B = int(inputted[1])

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

print(answer)

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

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

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



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

print(i)

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

Solution (Python):
from math import ceil
count = 0
n,m = map(int, input().split())
m -= 1
n -= 1
print(ceil(m/n))

Solution (Python):
import math
p,q= input().split()
a,b =(int(p), int(q))
count = 1

for i in range(math.floor((b/a)**2 + 4)):
    if count < b:
        count += a -1
    else:
        print(i)
        ans = i
        break

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

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

print(ans)

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

Solution (Python):
import math
import sys

stdin = sys.stdin

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(stdin.readline().rstrip())
nm = lambda: map(int, stdin.readline().split())
nl = lambda: list(map(int, stdin.readline().split()))
mod = 10**9 + 7 
sys.setrecursionlimit(1000010)

A,B  = nm()

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

Solution (Python):

from collections import Counter
def inputlist(): return [int(j) for j in input().split()]

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

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

Solution (Python):










"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""
  
def main():
  a,b = map(int,input().split())
  ans = 0
  outlet = 1
  while outlet < b:
    outlet -=1
    outlet += a
    ans += 1
    
    
  print(ans)
if __name__ == '__main__':
  main()

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

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

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

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

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

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

Solution (Python):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

a,b = iim()
print((b+a-3)//(a-1))

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

Solution (Python):
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    a = [int(i) for i in input().split()]

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

        if count >= a[1]:
            print(i)
            break

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

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

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

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

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

count = (B - A) // (A - 1)
amari = (B - A) % (A - 1)

if amari == 0:
    print(count + 1)
else:
    print(count + 2)

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b=INTM()
    print(int((b-1+a-1.1)//(a-1)))
if __name__ == '__main__':
    do()

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

x = 1
ans = 0

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

print(ans)

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

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

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

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

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

print(ans)

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

Solution (Python):
a,b = [int(x) for x in input().split()]
c = 0
d = 1
while True:
    if d>=b:
        print(c)
        break
    d += a - 1
    c += 1

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

result = 0

while puragu < B:
  puragu += A-1
  result += 1

print(result)

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

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

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

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

Solution (Python):
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

A, B = lr()
answer = ((B-1) + (A-2)) // (A-1)
print(answer)

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

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

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

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())
print(math.ceil(((b-1)/(a-1))))

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

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

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

Solution (Python):
A,B=list(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())

x = 1
ans = 0

while x < B:
    x += A
    x -= 1
    ans += 1
    if x >= B:
        break
print(ans)

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

main()

Solution (Python):


def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10000000)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate
    
    from bisect import bisect_left,bisect_right
    import heapq
    from math import floor, ceil
    

    
    

    
    
    
    
    
    
    
    
    
    
    
    
    
    

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



if __name__ == '__main__':
    main()

Solution (Python):


def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10000000)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate
    
    from bisect import bisect_left,bisect_right
    import heapq
    from math import floor, ceil
    

    
    

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

Solution (Python):
import sys

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

if b==1:
  print(0)
  sys.exit()
  
while ans<b:
  ans+=a-1
  count+=1

print(count)

Solution (Python):

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

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

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



if __name__ == '__main__':
    main()

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

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

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


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

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

Solution (Python):
A, B = map(int, input().split())
x = 0
X = B%(A-1)
Y = B//(A-1)

if B == 1:
  print(0)
elif A ==2:
  print(B-1)
elif A >= B:
  print(1)
elif X <= 1:
  print(Y)
else:
  print(Y + 1)

Solution (Python):

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

print(ans)

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

print(-(-(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)
  exit()
else:
  n = 1
  while (B - 1) / (A - 1) > n:
    n += 1
  print(n)

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

n = 1
c = 0

while n < B:
	n = n + A -1

	c = c+1

print(c)