peterverebics/CodeNet_Python_118 huggingface dataset:
from collections import defaultdict, deque
import sys
import heapq
import bisect
import itertools
import queue
import copy
import time
sys.setrecursionlimit(10**8)
INF = float('inf')
mod = 10**9+7
eps = 10**-7

def inp(): return int(sys.stdin.readline())

def inpl(): return list(map(int, sys.stdin.readline().split()))

def inpl_str(): return list(sys.stdin.readline().split())

a, b = inpl()
c = a-1
d = b-1
print((d+c-1)//c)
a, b = map(int, input().split())
print(0 if b == 1 else ((b - 1) + (a - 2)) // (a - 1))
import math
a, b = list(map(int,input().split()))
x = math.ceil((b-1)/(a-1))
print(x)
import math
A, B = map(int,input().rstrip().split())
ans = math.ceil((B-1)/(A-1))
print(ans)
#@ ABC139 B
A,B = list(map(int, input().split()))

pul = 1
cnt = 0
while pul < B:
    pul += A-1
    cnt += 1
    
print(cnt)
a,b=map(int,input().split())
s=(b-1)//(a-1)
print(s if s==(b-1)/(a-1) else s+1)
A, B = map(int, input().split())

for i in range(100):
    if 1 + (A-1) * i >= B: break
print(i)
import math
A,B = map(int,input().split())
print(math.ceil((B-1)/(A-1)))
A, B = map(int, input().split())
ans = 0
tap = 0
for i in range(10000):
    if B == 1:
        break
    if i == 0:
        tap += A
        ans += 1
    if i >= 1:
        tap -= 1
        tap += A
        ans += 1
    if tap >= B:
        break
print(ans)
A,B = map(int,input().split())
print(1-(A-B)//(A-1))
a,b = map(int, input().split())
socket = 1
ans = 0
while socket < b:
  socket = socket + a-1
  ans += 1
print(ans)
a, b = map(int, input().split())

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

print(tap)
# 2:50
a, b = map(int, input().split())
if b == 1:
    print(0)
    exit()

if a >= b:
    print(1)
else:
    b -= a
    cnt = 1
    while (b > 0):
        b -= (a - 1)
        cnt += 1
    print(cnt)
import math
a,b=map(int,input().split())
print(1+math.ceil((b-a)/(a-1)))
a, b = (int(i) for i in input().split())
x = 1
y = 0
while(100000):
  if b == 1:
    print(0)
    break
  if (a - 1) * y + a >= b:
    print(y + 1)
    break
  else:
    y += 1
A, B = map(int, input().split())
for i in range(20):
    if (A*i-(i-1) >= B ):
        print(i)
        exit(0)
#138
a,b = map(int, input().split())

res = 0
for i in range(1,21):
    if (a-1) * (i-1) + a >= b:
        res = i
        break
if b==1:
    res = 0
print(res)
A,B = map(int, input().split())
ans = 0
while ans*(A-1)+1 < B:
    ans+=1
print(ans)
a, b = map(int, input().split())
ans = 0
c = 1
while c < b:
  ans += 1
  c += a - 1
print(ans)
A,B=map(int, input().split())
N=0
while(1+(A-1)*N<B):
  N+=1
  
print(N)
A, B = map(int, input().split())
 
# A*x-(x-1) >= B
# (A-1)*x >= B-1
# x >= ceil((B-1)/(A-1))
print(-(-(B-1)//(A-1)))
a, b = map(int,input().split())

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

print(ans)
A,B=map(int,input().split())
total=0
i=0
if B==1:
  print(0)
else:
  while B>total:
    i+=1
    total=A*i-(i-1)
  print(i)
A, B = map(int, input().split())
s = 1
cnt = 0
while s < B:
  s += A-1
  cnt += 1
print(cnt)
a, b = map(int, input().split())
x = 0
y = 1
while y < b:
    y += (a - 1)
    x += 1

print(x)
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
import math
A,B =map(int,input().split())
soc= 1
tap=0
while(soc<B):
  soc-=1
  soc+=A
  tap+=1
#print(tap)
print(math.ceil((B-1)/(A-1)))
import sys
input = sys.stdin.readline
input = sys.stdin.buffer.readline

#sys.setrecursionlimit(10**9)

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()))
# rstrip().decode('utf-8')
#import numpy as np


def main():
	a,b=MI()
	for i in range(100):
		if (a-1)*i+1>=b:
			print(i)
			exit(0)
			
if __name__ == "__main__":
	main()
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline
#sys.setrecursionlimit(10**8)


def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


def main():
    a, b = geta(int)

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

    n = 1
    while a * n - n + 1 < b:
        n += 1

    print(n)


if __name__ == "__main__":
    main()
A, B = map(int, input().split())
ans = 0
now = 1
while True :
    if now >= B :
        break
    now = now + A - 1
    ans += 1
print(ans)
A,B=map(int,input().split())
socket=1
tap=0

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


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

def actual(a, b):
    return math.ceil((b - 1) / (a - 1))

print(actual(a, b))
a,b = map(int,input().split())
ans = 0
n = 1

while n < b:
  n += a - 1
  ans += 1
  
print(ans)
a, b = [int(i) for i in input().split()]
i = 0
while True:
    if a * i - i + 1 >= b:
        print(i)
        break
    i += 1
#!/usr/bin/python3
# -*- coding:utf-8 -*-

from math import ceil

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

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

ans = 0
consent = 1

while consent < B:
    ans += 1
    consent -= 1
    consent += A
print(ans)
import math
A,B=map(int,input().split())
print(math.ceil((B-1)/(A-1)))
import sys
A, B = map(int, input().split())

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

for i in range(1,23):
  if i*(A-1)+1 >= B:
    print(i)
    sys.exit()
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()
a,b = map(int,input().split())
count,socket = 0,1
while socket < b:
  socket += (a - 1)
  count += 1
print(count)
a, b = map(int, input().split())
c = 1
ans = 0

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

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

i = a
c = 1
while int(i) < int(b):
  i += int(a) - 1
  c += 1
if int(b) == 1:
  print(0)
else:
  print(c)
A, B = (int(x) for x in input().split())

S = A
num  = 1
i = 1

if (B == 1):
    print("0")
elif (A >= B):
    print("1")
else:
    while(S < B):
        S = (A * (i + 1)) - i
        num += 1
        i += 1
    print(num)
import sys
A, B = map(int, input().split())

inf = 10**7
if (B == 1):
    print(0)
    sys.exit()
for i in range(1, inf):
    if B <= ((A - 1) * (i - 1) + A):
        print(i)
        break
x = list(map(int, input().split()))
count = 0
a = 0
while a+1 < x[1]:
  a += (x[0]-1)
  count += 1
print(count)
import math
A, B = map(int,input().split())

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

print(x)
a, b = map(int, input().split())
cnt = 0
ans = 1
while ans < b:
    ans += (a-1)
    cnt += 1
print(cnt)
a,b=map(int,input().split())
for i in range(21):
	if b<= a*i-(i-1):
		print(i)
		break
#ABC139B
a,b = map(int,input().split())
ans = 0 
outlet = 1
while b>outlet:
    outlet = outlet - 1
    outlet = outlet + a
    ans = ans + 1
print(ans)
a, b = map(int, input().split())
print(1 + -(-(b - a) // (a - 1)))
a,b=[int(x) for x in input().split()]
ans=1
for i in range(1,30):
    c=a*1+(a-1)*(i-1)
    if c>=b:
        ans=i
        break
if b==1:
    print(0)
else:
    print(ans)
A, B = [int(i) for i in input().split()]

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

print(res)
a, b = (int(i)for i in input().split())
ans =0
d = 1
while d<b:
  ans+=1
  d = d-1+a
print(ans)
a= list(map(int, input().split()))

x = a[0]
y = a[1]

n = 2
if y == 1:
    print(0)
elif x >= y:
    print(1)
else:
    while ((x * n) - (n - 1)) < y:
        n += 1
    print(n)
x,y = map(int,input().split())
t = x
c = 1
if y == 1:
    print(0)
    exit()
for i in range(100):
    if t>=y:
        print(c)
        break
    t += x-1
    c += 1
    #print(t)
# -*- coding: utf-8 -*-

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

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

print(count)
def sum(A, B):
  n = 0
  while True:
    if n >= (B-1)/(A-1):
      return n
    else:
      n += 1

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

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

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

print(n)
# 139 B  # nxt try

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

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

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

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

print(math.ceil((b - a)/(a - 1)) + 1)
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)
a, b = map(int, input().split())
print((b-2)//(a-1)+1)
import math


a, b = map(int, input().split())
n = math.ceil((b - 1)/(a - 1))
print(n)
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()
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()
a, b = [int(x) for x in input().split()]

cnt = 0
taps = 1
while True:
    if taps >= b:
        break
    else:
        taps += a - 1
        cnt += 1

print(cnt)
def main():
    A, B = (int(x) for x in input().split())
    ans = 1
    count = 0
    while ans < B:
        ans = ans - 1 + A
        count += 1
    print(count)


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

ans = 0
consent = 1

while consent < B:
	ans += 1
	consent -= 1
	consent += A
print(ans)
# coding: utf-8
 
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)
A,B=[int(x) for x in input().split(" ")]
for i in range(20):
    if A+(i-1)*(A-1)>=B: break
print(i)
import math
a,b = map(int,input().split())
c = (b - 1) / (a - 1)
c = math.ceil(c)
print(c)
import math
A,B = list(map(int,input().split(" ")))
print(math.ceil((B-1) / (A-1)))
a, b=map(int, input().split())
t=1
k=a
if b==1:
    print(0)
    exit()
    
while 1:
    if k>=b:
        print(t)
        exit()
    k-=1
    k+=a
    t+=1
a,b=input().split()
a=int(a)
b=int(b)
if b==1:
  print(0)
elif a>=b:
  print(1)
else:
  if (b-a)%(a-1)==0:
    print(int((b-a)/(a-1))+1)
  else:
    print(int((b-a)/(a-1))+2)
A,B = map(int, input().split())
cnt = 1
ans = 0
while cnt < B:
    cnt += A-1
    ans += 1
print(ans)
A,B=map(int,input().split())
val=1
cnt=0
if B==1:
    print(0)
else:
    while True:
        val=val-1+A
        cnt+=1
        if val>=B:
            break
    print(cnt)
A, B = map(int, input().split())
i = 1
j = 0
while i < B:
    i += A -1
    j += 1
print(j)
A, B = map(int, input().split())

count = 0
avail = 1

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

print(count)
a,b = map(int,input().split())
x = a-1
y = b-1
if y%x==0:
    print(y//x)
else:
    print(y//x+1)
a,b = map(int,input().split())
c = 0
while 1+a*c-c < b:
    c += 1
print(c)
A, B = map(int, input().split(" "))
n = 1
ans = 0
while n < B:
  n += A - 1
  ans += 1

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

for i in range(101):
    socket=1+i*(a-1)
    if socket>=b:
        print(i)
        exit(0)
a,b=(int(x) for x in input().split())
tap = 1
count = 0

while tap < b:
    tap = tap + a - 1
    count = count + 1
    
print(count)
a, b = (int(i) for i in input().split())
count = 0
if b == 1:
    print("0")
    exit()
while True:
    b -= a
    count += 1
    if b <= 0: break
    b += 1
print(count)
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()
a,b=map(int,input().split())
ans = 1
count=0
while True:
  if b > ans:
    ans+=a-1
    count+=1
  else:
    print(count)
    break
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)
A, B = map(int, input().split())
cnt =  0
outlet = 1

while outlet < B:
    outlet -= 1
    outlet += A
    cnt += 1
print(cnt)
a,b=map(int, input().split())

print((b-1 + (a-2))//(a-1))
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)
a, b = map(int, input().split())
a -= 1
b -= 1
print((a+b-1)//a)
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)
A, B = map(int, input().split())
cur = A
cnt = 1
if B == 1:
    print(0)
    exit()
while True:
    if cur < B:
        cur += A-1
        cnt += 1
    else:
        break
print(cnt)
A, B = map(int, input().split())

ans = 0
outlet = 1

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

print(ans)
A, B = map(int, input().split())
B -= A
print((B + (A - 1) - 1) // (A - 1) + 1)
a, b = map(int, input().split())
import math
print(math.ceil((b-1)/(a-1)))
a,b = map(int, input().split())
c = 1
ans = 0
if b == 1:
  ans = 0
else:
  for i in range(21):
    c = c-1 + a
    if c >= b:
      ans = i + 1
      break
print(ans)
a,b = map(int,input().split())
print((a+b-3)//(a-1))
import math
a,b = map(int, input().split())
print(1+math.ceil((b-a)/(a-1)))
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)
a, b = [int(x) for x in input().split()]
print(1 - (a - b) // (a - 1))
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)
a,b = map(int, input().split())
i = a
c = 1
while int(i) < b:
  i += a - 1
  c += 1
if b == 1:
  print(0)
else:
  print(c)
a, b = map(int, input().split())

i=0

while True:

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


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

n = 2
while n*a-(n-1) < b:
  n += 1
    
print(n)
# -*- coding: utf-8 -*-

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)
a,b=map(int,input().split())
n=(b-1)/(a-1)
if n ==int(n):
  print(int(n))
else:
  print(int(n)+1)
A, B = map(int, input().split())
print((B-1 + (A-1) - 1)//(A-1))
from math import ceil
A,B=list(map(int, input().split()))
print(ceil((B-1)/(A-1)))
a,b=map(int,input().split())
for i in range(21):
    if (a-1)*(i)+1>=b:
        ans=i
        break
print(ans)
l=list(map(int,input().split()))
plug=((l[1]-l[0])//(l[0]-1))+1
if (l[1]-l[0])%(l[0]-1)!=0:
    plug=plug+1
print(plug)
a, b = map(int, input().split())
ans = 0
cnt = 1
while cnt < b:
    cnt -= 1
    cnt += a
    ans += 1
print(ans)
a,b=input().split(" ")
count=0
sum=1
while sum<int(b):
  sum=sum+int(a)-1
  count+=1
print(count)
A, B = map(int, input().split())
ans = 0

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

if B==1:
    print('0')
else:
    print(ans)
a,b = map(int,input().split())
c = 1 
ans = 0
while c < b:
  c += a-1
  ans += 1
print(ans)
A, B = map(int, input().split())
print((B-2)//(A-1)+1)
from math import ceil

A, B = map(int, input().split())
result = ceil((B-1)/(A-1))
print(result)
A,B = map(int,input().split())
if B == 1:
    answer = 0
elif B<=A:
    answer = 1
else:
    tap = 2
    while True:
        if tap*A-tap+1 >= B:
            answer = tap
            break
        else:
            tap += 1
print(answer)
import math

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

socket = 1
cnt = 0
while True:
  if B == 1:
    print(0)
    exit()
  else:
    socket = socket + A - 1
    cnt += 1
    if socket >= B:
      print(cnt)
      exit()
A,B=map(int,input().split())
K=0
M=1
while M<B:
  K+=1
  M+=A-1
print(K)
a,b = map(int,input().split())
x = 1
cnt = 0
while x < b:
    x = x -1 + a
    cnt += 1

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

# 整数複数個
A, B = map(int, input().split())

C = -((-B+1) // (A-1))
print(C)
A,B = map(int, input().split())
print(min(i for i in range(10**6) if 1+(A-1)*i>=B))
import math

a, b = map(int, input().split())
print(math.ceil((b-1)/(a-1)))# + 1)
a,b = map(int,input().split())
cnt = 1
ans = 0
while cnt < b:
    cnt += a-1
    ans += 1
print(ans)
a,b = map(int, input().split())
ans = 0
while True:
  if (a-1)*ans + 1 >= b:
    print(ans)
    exit()
  else:
    ans += 1
a,b = map(int,input().split())
current = 1
ans = 0

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

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

print(n)
#B - Power Socket
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)
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import numpy as np

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

if __name__ == '__main__':
    main()
a,b = map(int,input().split())
ans = 0
tap = 1

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

ans = 0
current = 1

while current < B:
  current += A-1
  ans += 1
    
print(ans)
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
a,b = map(int,input().split(" "))
k = 0
while ((a-1) * k + 1) < b:
    k +=1
print(k)
A, B = map(int,input().split())

cnt = 0
outlet = 1

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

print(cnt)
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)
import math
a,b = map(int,input().split())
print(math.ceil(((b-1)/(a-1))))
import math
a,b=map(int, input().split())
A=a-1
B=b-1
print(math.ceil(B/A))
a, b = map(int, input().split())
current = 1
nums = 0

while True:
  if b <= current:
    print(nums)
    exit(0)
  current += (a - 1)
  nums += 1
#B-powersocket
A, B = map(int, input().split())
A -= 1
B -= 1

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

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

print(ans)
A,B = map(int,input().split(" "))
print((B+A-3)//(A-1))
# B - Power Socket
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()
a,b = map(int,input().split())

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

print(i)
#190901B
A, B = map(int, input().split())
ans=0
if B == 1:
    ans = 0
else:
    if A == 2:
        ans = B -1
    else:
        if B%(A-1)==1:
            ans = (B-1)//(A-1)
        else:
            ans = (B-1)//(A-1)+1
print(ans)
a,b=map(int,input().split())

socket=1
tap=0
while socket<b:
    tap+=1
    socket-=1
    socket+=a
print(tap)
import sys
a,b=map(int,input().split())
d=(b-1)//(a-1)
c=(b-1)/(a-1)
if c-d>0:
    d+=1
print(d)
import sys
import math
import bisect

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

if __name__ == "__main__":
    main()
a , b = map(int, input().split())

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

if B == 1:
    print(0)
    exit()
elif B <= A:
    print(1)
    exit()
else:
    for i in range(20):
       if B <= A+i*(A-1):
           print(1+i)
           exit()
a, b = map(int, input().split())

if b == 1:
  cnt = 0
else:
  socket = a
  cnt = 1
  while socket < b:
    socket += (a-1)
    cnt += 1
  
print(cnt)
import math
a, b = map(int, input().split())
print(math.ceil((b-a)/(a-1))+1)
A, B = list(map(int, input().split()))
a = 1
cnt = 0
while a < B:
    a -= 1
    a += A
    cnt += 1
print(cnt)
args = input().split()
a,b = int(args[0]),int(args[1])
if b==1:
  print("0")
elif b<=a:
  print("1")
else:
  print(int((b-a)/(a-1))+1+((b-a)%(a-1)!=0))
A, B = map(int, input().split())
if (B-1) % (A-1) == 0:
    print((B-1)//(A-1))
else:
    print((B-1)//(A-1)+1)
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)
a,b = map(int,input().split())

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

cnt = 0
plug = 1

if b > 1:
    while plug < b:
        plug = plug - 1 + a
        cnt += 1

print(cnt)
import numpy as np
A, B = input().split(' ')
A = int(A)
B = int(B)
print(int(np.ceil((B - 1) / (A - 1))))
import math
a, b = map(int, input().split())
print(math.ceil((b-1)*1.0/(a-1)))
import math
input_line=input().split(" ")
A,B=int(input_line[0])-1,int(input_line[1])-1
print(math.ceil(B/A))
a,b=map(int, input().split())
print(-((-b+1)//(a-1)))
a,b = map(int, input().split())
plag = 1
count = 0

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

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

for n in range(0, 500):
    if 1 + n * A - n >= B:
        break

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

num = 0
while True:
  if a * num - (num-1) >= b:
    break
    
  num += 1
  
print(num)
#!/usr/bin/env python3
a, b = map(int, input().split())
print((b-1)//(a-1) + ((b-1)%(a-1) != 0))
A,B=input().split()
A=int(A)
B=int(B)
for i in range(100):
  if 1+(A-1)*i>=B:
    print(i)
    break
a,b=map(int,input().split())
print((b-2)//(a-1)+1)
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()
a,b = map(int,input().split())
c=0
plug = 1
while(plug<b):
    plug-1
    plug+=a-1
    c+=1
print(c)
import sys
import os
import math


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

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


if __name__ == '__main__':
    main()