peterverebics/CodeNet_Python_118 huggingface dataset:
import math


def readints():
    return list(map(int, input().split()))


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

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

sum = 0
for i in range(b//a):
    sum += 1
print(sum+1)
a,b=input().split()
a=int(a)
c=a
b=int(b)
i=0
k=0
while c<b:
  c=c+a-1
  k=k+1
print(k)
a, b = map(int, input().split())
num = 1
ans = 0
while num < b:
    num += a
    ans += 1
print(ans)
import math

a,b=map(int,input().split())
if a>=b:
    print(b)
else:
    print(math.ceil(b/a))
a,b=map(int,input().split())
z = b // a 
x = b % a
if x==0:
    print(b//a)
elif z==0:
    print('1')
else:
    b -= a
    a -= 1
    y = b % a
    if y==0:
        print(1 + b//a)
    else:
        print(2 + b//a)
A, B = map(int, input().split(' '))
print((B + A - 1) // A)
import math
a,b = map(int,input().split())
i = 0
while i < math.log(b,a):
  i += 1
print(i)
a, b = map(int, input().split())

cnt = 1
p = a

while p < b:
    p += a - 1
    cnt += 1
    
print(cnt)
a= list(map(int, input().split()))

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

n = 2
if x >= y:
    print(1)
else:
   while ((x - 1) * n) + 1 < y:
        n += 1

print(n)
a,b=map(int,input().split())
count=0
while b>0:
    b=b-a
    count=count+1
     
print(count)
A,B = map(int,input().split())
print(B//A if B%A==0 else (B//A)+1)
A,B = map(int,input().split())
if A >= B:
    print(1)
else:
    B-=A
    A-=1
    print(-(-B//A)+1)
a,b=map(int,input().split())
c= (b-a)//(a-1)+1
print(str(c))
a, b = map(int, input().split())
if a >= b:
    ans = 1
else:
    ans = (b-2)//(a-1)+1
print(ans)
import math
A, B=map(int, input().split())

if B==1:
  print(0)
else:
  if math.ceil(B/A)==1:
    print(1)
  else:
    if (A-1)==1:
      print(B//(A-1))
    else:
      if (B-A)%(A-1)==0:
        print((B-A)//(A-1)+1)
      else:
        print((B-A)//(A-1)+2)
N,K = [int(x) for x in input().split()]
N = N-1
kosuu = 1
for i in range(1,1000):
    kosuu += N
    if kosuu >= K:
        print(i)
        break
a,b = map(int,input().split())

num = 1
while True:
  if a * num - (num-1) >= b:
    break
    
  num += 1
  
print(num)
a, b = map(int, input().split())

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

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


if __name__ == '__main__':
    main()
A,B=input().split()
import math
math.ceil((int(B)-1)/(int(A)-1))
x, y = map(int, input().split())
if y <= x:
    print(1)
else:
    cnt = 1
    total = x
    while True:
        total += (x - 1)
        cnt += 1
        if total >= y:
            break
    print(cnt)
from math import ceil
A,B=map(int, input().split())

print(ceil( B / (A-1)))
# coding: utf-8
import math

a, b = map(int, input().split())
ans = 0
consent = 0
plusplug = a - 1
if a >= b:
    print(1)
else:
    while consent <= b:
        consent += plusplug
        ans += 1
    print(ans)
import math
A,B  = list(map(int,input().split()))
ans  = 1
c = 0
if B <= A:
    print("1")
else:
    while ans < B:
        ans += A-1
        c += 1
    print(c)
a, b = map(int, input().split())

n = a
ans = 1

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

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

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

B -= A
ans = 1

while B >= 0:
  B -= (A - 1)
  ans += 1
  
print(ans)
exit()
import math
a,b=map(int,input().split())
print(math.ceil(b/a))
import math
A, B=map(int, input().split())

if math.ceil(B/A)==1:
  print(1)

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

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


if __name__ == "__main__":
    main()
a,b = map(int,input().split())
ans = 0
while b > 0:
    b-=a
    ans+=1
    if b<=0:break
    b+=1
print(ans)
A, B = map(int, input().split())

C = B//A + 1

number_of_mouth = A * C - (C-1)

if number_of_mouth >= B:
    print(C)

elif A == B:
    print('1')

else:
    C += 1
    print(C)
import math 
a,b=map(int,input().split())
print(math.ceil(b/a))
A, B = map(int, input().split())

kuti = 0
i = 0
while kuti < B:
    kuti = A * i - 1
    i += 1
print(i-1)
a,b = map(int,input().split())

cnt = a
ans = 1
while(True):
    if(cnt >= b):
        break
    cnt -= 1
    cnt += a
    ans += 1
print(ans)
a, b = map(int, input().split())
count = 1
if b > 0:
  while a < b:
    a += a 
    count += 1
  print(count)
else:
  print(0)
A,B = map(int, input().split())
ans = 1
while B-A > 0:
    B = B-(A-1)
    ans+=1
print(ans)
import math
a,b=map(int,input().strip().split())
print(math.ceil(b/a))
a,b=map(int,input().split())
if b%a>0:print(b//a+1)
elif b<=a:print(1)
else:print(b//a)
a,b = map(int,input().split())
i = 0

while True:
    if a*i < b:
        i += 1
    else:
        break

print(i)
A,B=map(int,input().split())
if B%A!=0:
  print(B//A+1)
else:
  print(B//A)
A,B=map(int,input().split())
count = 0
tap = 1
for i in range(30):
  tap += A-1
  count += 1
  if tap >= B:
    break
print(count)
A,B=map(int,input().split())
print(int(B/A)+1)
def main():
  a,b= list(map(int,input().split()))
  ans=a
  num=1
  while ans<b:
    num+=1
    ans+=a-1
  print(num)

main()
a,b=map(int,input().split())
z = b // a
if z==0:
    print('1')
else:
    b -= a
    a -= 1
    y = b % a
    if y==0:
        print(1 + b//a)
    else:
        print(2 + b//a)
a,b = map(int,input().split())
count = 0
while b > 0:
    b = b -a
    count += 1
print(count)
a,b=map(int,input().split())
if b%(a-1)==0:print(b//(a-1))
elif b%(a-1)==1:print(b//(a-1))
else:print(b//(a-1)+1)
a, b = map(int, input().split())
num = a
for i in range(50):
    if num > b:
        break
    else:
        num -= 1
        num += a
print(i+1)
A, B = map(int, input().split())
 
if B%(A-1) == 1:
  print((B-1)//(A-1) )
elif B == 0:
  print(0)
else:
  print(B//A +1)
a, b = map(int, input().split())

result = 0
result += a
cnt = 1

while b < result:
    result += a - 1
    cnt += 1

print(cnt)
a, b = [int(x) for x in input().split()]
print((b - a) // (a - 1) + 1)
# 標準出力を取得（strデータ）
A, B = input().split()

# A, B を integerに変換
A = int(A)
B = int(B)

# OAタップの数を表す変数の初期値を 1 とする
num = 1


if A == 1 & B == 1:
    num = 0
else:
    while (A - 1) * (num - 1) + A < B:
        num = num + 1

# 結果を出力
print(num)
import math
a, b = map(int, input().split())
print(math.ceil(b-1)/(a-1))
A,B=map(int,input().split())

s=0

while B-(A-1)*s+1>0:
     s+=1
print(s)
A, B = map(int, input().split())
 
if (B-1)%(A-1) == 0:
  print((B-1)/(A-1))
else:
  print((B-1)//(A-1) +1)
a,b = map(int,input().split())
if a>=b:
    print(round(b/a))
elif a<b:
    x=round(b/a)+1
    print(x)
a,b = map(int,input().split())
i = 0
while a+(a-1)*i <b:
  i += 1
print(i+1)
def calulate(m, n) : 
	n_adapters = 0
	if n <= m :
		n_adapters = 1
	else :
		n_adapters = n//m
		if n % m != 0:
			n_adapters += 1
	return n_adapters

M, N = map(int, input().split())
print(calulate(M, N))
import sys
sys.setrecursionlimit(10**6)
A,B = map(int,input().split())
cnt = 1
while True:
    if (B - (A + (A - 1) * cnt) <= 0):
        break
    else:
        cnt += 1

if A >= B:
    print(1)
else:
    print(cnt + 1)
#B
a,b = map(int,input().split())

if b == 1:
    print(0)
elif a >= b:
    print(1)
else:
    print((b-a)//a + 2)
def main():
    a, b = map(int, input().split())
    num = 1
    ans = 0
    for i in range(1, 21):

        ans = a * i - (i-1)
        if ans >= b:
            print(i)
            break
    
        


if __name__ == "__main__":
    main()
a, b = map(int, input().split())
cnt = 0
power = 1
if a > b:
    print(1)
    exit()

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

print(cnt)
A,B = map(int,input().split())
if B % A == 0:
    print(B//A)
else:
    A -= 1
    print(B//A+1)
a,b=map(int,input().split())
import math
print(math.ceil(b/a))
A, B = map(int,input().split())
cnt = 0
while B > 0:
    B -= A
    cnt += 1
print(cnt)
a,b=map(int, input().split())
c="必要な電源タップ数は"
d="個です。"
count=0
total=0
while True:
    
#    total+=a
    
#    if total<b:
#        total-=1
#        count+=1
#    else:
#        break
    if total >= b:
        break
    total += (a-1)
    count+=1
print(count)
a, b = map(int, input().split())
print((b-1)//(a-1))
a, b = map(int, input().split())
if a == b:
    print(1)
else:
    print((b//a)+1)
a,b = map(int,input().split())
sumA = 0
count  =0
t = True
while t:
    if sumA<b:
        count +=1
    elif sumA>=b:
        t = False
    sumA += a
print(count)
a,b=map(int,input().split())
ans=1
plag=a
while plag<b:
  ans+=1
  plag=plag+a-1
print(ans)
a,b=map(int,input().split())
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)
a, b = map( int, input().split())
i = 0
while True:
  i += 1
  if  ( a - 1 ) * i + 1 >= b:
    break
print( i )
a,b = map(int,input().split())
sumA = 0
count  =0
t = True
while t:
    if sumA<=b:
        count +=1
    elif sumA>=b:
        t = False
    sumA += a
print(count)
a, b = map(int, input().split())
 
tap_num = 0
con_num = a + (a * tap_num -1)
 
# con_num > b となることが必要条件
# a + (a * tap_num -2) < b < a + (a * tap_num -1)
 
for tap_num in range(b):
    if a + (a * tap_num -1) >= b:
        break
    
print(tap_num)
a,b=map(int,input().split())
c=a-1
count=1
while a<b:
  a=a+c
  count+=1
print(count)
a, b = map(int, input().split())
c = 1
while a < b:
  a += a
  c += 1
print(c)
a, b = map(int,input().split())

ans = 1
outlet = 4

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

print(ans)
a,b = list(map(int,input().split()))
if a<b and b%2!=0:
    a=((b//a)+1)
    print(a)
if a<b and b%2==0:
    a=((b//a))
    print(a)
elif a>b:
    print(b)
elif a ==b:
    print(b//a)
A, B = (int(x) for x in input().split())

S = A
num  = 1
i = 0

while(S < B):
    i += 1
    A = A * 2
    S = A - i
    num += 1

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

x = 1
num = 0
while True:
    x += a - 1
    num += 1
    if x >= b:
        break
        
print(num)
a , b = map(int, input().split())
if b <=a:
    print(b // a )
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)
a, b = input().split(' ')
c = int(a)
d = int(b)

if d%c == 0:
  print(str(d//c))
else:
  print(str(d//c+1))
a, b = map(int, input().split())
print((b >= a) + max(((b - a) // (a - 1)), 0))
a,b=map(int,input().split())
i,count=1,a
while count<b:
    count+=a
    i+=1
print(i)
a,b=map(int,input().split())
cnt=0
while True:
    a+=a-1
    cnt +=1
    if a>b:
        break
print(cnt)
import sys
a, b =map(int, input().split())
if a == b or b == 1:
  print(1)
  sys.exit()
 
c = b//a
if a*c == b:
  print(c)
else:
  print(c +1)
'''
INPUT SHORTCUTS
N, K = map(int,input().split())
N ,A,B = map(int,input().split())
string = str(input())
arr = list(map(int,input().split()))
N = int(input())
'''


A, B = map(int,input().split())
ans = 0
for i in range(21):
	if ((A*(i+1))-i)>=B:
		ans = i+1 
		break
print(ans)
p = list(map(int,input().split()))
#print(p)
min_tap = p[1] % p[0]
if min_tap == 0:
    count = int(p[1] / p[0])
else:
    count = int(p[1] // p[0] + 1)
print(count)
A,B = map(int,input().split())
print(B//A+1)
#!/usr/local/bin/python3
# coding: utf-8


hairu = input()
sockets = 0
plugs = 1
ab = hairu.split()

while True:
    sockets += 1
    plugs -= 1
    plugs += int(ab[0])
    if int(ab[1]) <= plugs:
        print(sockets)
        break
import math
A, B = map(int,input().split())
for i in range(30):
  if ((A-1)*i + A >= B):
    print(i+1)
    break
A,B = map(int,input().split())
x,y = 0,0

x = int(B/A)
y = B%A

if y == 0:
    print(x)
else:
    print(x+1)
# -*- coding: <encoding name> -*-

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

ans = A
count = 1
while ans < B:
    ans += (A-1)
    count += 1
    
print(count)
A,B = map(int,input().split())

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

ans = 1
temp = A

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

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

out = 1
i = 1
while(True):
    out -=1
    out += a
    if out >= b:
        print(i)
        break
    i += 1
a, b = map(int, input().split())

for i in range(100):
	if a+(a-1)*i>=b:
		print(i+1)
		break
mn = list(input().split())
mn = [int(i) for i in mn]
m = mn[0]
n = mn[1]
if m>=n:
	print("1")
else:
	outputs = m
	i = 2
	while outputs<n:
		outputs = m*i
		i += 1
	print(str(i-1)+" adapters, each with "+str(m)+" audio outputs, extend the single audio output to "+str(n))
import math

A, B = [int(n) for n in input().split()]
if B==1:
  print(0)
elif A==B:
  print(1)
else:
  n = math.ceil(B/A)
  print(n+1 if (A-1)*(n-1)+A < B else n)
# #!/usr/bin/env python3
# # -*- coding: utf-8 -*-

import math


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


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

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

if math.ceil(B/A)==1:
  print(1)

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

ans = 1
i = 0
if A == B:
    print(ans)
else:
    while A * ans - i < B:
        ans+= 1
        i += 1
    print(ans)
a,b = map(int,input().split())
ans = 0
while b > 0:
    if b <= a:
        ans+=1
        break
    ans+=1
    b-=(a-1)
print(ans)
a, b = map(int, input().split())
ans = -(-b//a)
print(ans)
A,B = map(int, input().split())
K = A
n = 1
while K < B:
    K += A-1
    n += 1
print(n)
import math
A,B = list(map(int,input().split()))

print(int(round((B+1)/A,0)))
#-*-coding:utf-8-*-
import sys
input=sys.stdin.readline

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

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


if __name__=="__main__":
    main()
A, B = map(int, input().split())
def gen(a, n):
    return a * n - n + 1
for t in range(1,21):
    socket = gen(A,t)
    if  socket >= B:
        ans = t
        break
print(ans)
a,b = map(int,input().split())

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

def solution(a,b):
   if a>= b:
        return 1
   else:
        inpu = 1
        while b > (a -1) * inpu + a:
            inpu +=1
        print(inpu + 1)
a, b = [int(_) for _ in input().split()]
print(b // a + (b % a > 0))
A, B = map(int, input().split())

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

print(N)
A,B = map(int,input().split())
C = (B-1)/(A-1)
r = (B-1)%(A-1)

if r == 0:
  print(C)
else:
  print(C+1)
a,b=map(int,input().split())

if b==1:
  print(0)
if b>1:
  x=0
  ans=0
  while x<b:
    ans+=1
    x+=a
  print(ans)
a, b = list(map(int, input().split()))
ans = b//a
if ans * a < b:
    ans += 1
print(ans)
input = input().split(" ")
a, b = int(input[0]), int(input[1])
ans = -(-b // a)
print(ans)
a, b = map(int, input().split())
c = 1
while a < b+1:
  a += a
  c += 1
print(c)
# coding: utf-8
import math
a, b = map(int,input().split())

if a >= b:
    ans = 1
else:
    ans = 1
    ans += math.ceil((b-a)/(a-1))
if b == 1:
    ans = 1
print(ans)
a, b = map(int, input().split())
ans = 0
while b>0:
    b -= a
    ans += 1
print(ans)
A,B = input().split(' ')
num = 1
while int(A)*(num -1) + 4 < int(B):
    num += 1
print(num)
A, B = map(int, input().split())
print(B//A +1 if B%A != 0 else B//A)
A,B = map(int, input().split())
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
a, b = map(int, input().split())
flag = True
cnt = 0
sum_ = 0
while b > sum_:
    if flag:
        sum_ += a
        flag = False
        cnt += 1
    else:
        sum_ += a - 1
        cnt += 1
print(cnt)
A,B=map(int,input().split())
s=A
for i in range(1,100):
    if s>=B:
        break
    s+=A-1
print(i)
import math

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

if B == 1:
    print(0)
else:
    if (math.ceil(B/A) - 1) * A + A < B:
        print(math.ceil(B/A) + 1)
    else:
        print(math.ceil(B/A))
A,B=map(int,input().split())
if A==B:
    print(1)
else:
    print(B//A+1)
a, b = map(int, input().split())  
def calc(m,B, i):
    if m == 0:
        return 0
    if (i*(m-1) >= B-1):
        return i
    return calc(m,B, i+1)
print(calc(a,b,i=1))
def main():
    a, b = map(int, input().split())
    print(-(-b//a))

main()
A,B=map(int,input().split())
x=0
cnt=1

while(cnt < B):
  cnt -= 1
  cnt += A
  x += 1
    
print(cnt)
A, B = map(int, input().split())
count = 1
ans = 0
for i in range(100):
  ans += 1
  count += A - 1
  if count >= B:
    break
print(ans)
a, b = map(int, input().split())

if a >= b:
    print(1)   
elif b % a == 0:
  print(b//a)
else:
  print(b//a + 1)
import math

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

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

print(-1*(-1*B // A))
q_input = input()

a, b = map(int, q_input.split(' '))

if a == b:
    print(1)
else:
    ans = int((10-1+a-2)/(a-1))
    print(ans)
A, B = list(map(int, input().split()))
result = B // A
if B % A != 0:
    result += 1
print(result)
#--power socket

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

q, mod = divmod(b,a)
if (q == 0):
  print("0")
  exit()

if (a >= b):
  print("1")
elif (a < b and mod == 0):
  print(q)
elif (a < b and mod != 0):
  print(q+1)
else:
  pass
a,b = map(int,input().split())
count = 1
ans = 0
while count<=b:
    count -=1
    count +=a
    if count >=b:
        ans +=1
        break
    ans +=1
print(ans)
A,B=map(int,input().split())
if B%A==0:
    print(B//A)
else:
    print(B//A+1)
# coding: utf-8
 
a,b=list(map(int,input().split()))
 
mouse_tot = a
mouse_cnt = 1
 
while mouse_tot <  b:
    mouse_tot += a-1
    mouse_cnt += 1
 
print(mouse_cnt)
a,b = map(int,input().split())
if b==1:
  print(0)
elif a%b == 0:
  print(b//a)
else:
  print(b//a+1)
A,B=map(int,input().split())
if B%A==1:
  res=B//(A-1)
else:
  res=-(-B//(A-1))
print(res)
import math
A,B=map(int, input().split())
 
print(math.ceil(B/A))
lst = list(map(int,input().split(" ")))
n = (lst[1]-1)/lst[0] +1
print("%d" % n )
import sys
A,B = map(int,input().split())

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

while True:
    if(A >= B):
        break
    else:
        ans += 1
        A+= (A - 1)
print((ans))
lst = list(map(int,input().split(" ")))
n = 1
while n < lst[1]:
  n = n-1+lst[0]
print("%d" % n)
a , b = map(int, input().split())

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

left = max(b - a, 0)
if left == 0:
    print(1)
    exit(0)

if left % (a - 1) == 0:
    print(left // (a - 1) + 1)
else:
    print(left // (a - 1) + 2)
a, b = map(int, input().split())
if a >= b:
  print(1)
elif int(b % (a - 1)) == 0:
  print(int(b / (a - 1)))
else:
  print(int(b / a + 1))
a,b = map(int,input().split())
for i in range(20):
    if a +(a-1)*i >=b:
        print(i+1)
        break
a, b = map(int, input().split())
for i in range(11):
  if a*i - (i-1) >= b:
    print(i)
    exit()
# coding: utf-8
import math
A, B = map(int, input().split())
print(math.ceil(B/A))
x, y = map(int, input().split())
print(((y-1)//x)+1)
a, b = map(int, input().split())
c = b//a
print(c + 1)
a,b=map(int,input().split())
x=1
if a<b:
  while True:
    x+=1
    if x*(a-1)+1>=b: break
print(x)
a, b= map(int, input().split())
s = 0
while a <= b:
    s += 1
    if a == b:
        break;
    elif s > 1:
        a = 2*a + 1
        print(a)
print(s)
def resolve():
    A, B = list(map(int, input().split()))
    cnt = A
    ans = 1
    while cnt < B:
        cnt += A-1
        ans += 1

    print(ans)

if '__main__' == __name__:
    resolve()
a, b = map(int, input().split())
if (b == a ):
    print(1)
else:
    print((b-1)//(a-1))
a, b = list(map(int, input().split()))
count = 0
ans = 0

if count == 0:
    count += a
    ans += 1

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

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

cnt = 0
while True:
    cnt += 1
    if cnt == 1:
        x = A * cnt
    else:
        x = (A * cnt) - 1
    if x >= B:
        print(cnt)
        break
import sys
import math

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

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

ans = 0
cnt = 0

if A > B:
    print(1)
    exit()

while B > ans:
    ans += A
    cnt += 1

    if B <= ans:
        break

    else:
        ans -= 1

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

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

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

if b % a ==0:
  print(b/a)
else:
  print(int(b/a) + 1)
import sys
sys.setrecursionlimit(10**6)
A,B = map(int,input().split())
cnt = 0
tmp = A
while True:
    cnt += 1
    if tmp >= B:
        break
    else:
        tmp += A - 1 

if B ==0:
    print(0)
else:
    print(cnt)
def solve():
    N, M = map(int, input().split())
    r = M // (N-1)
    b = M % (N-1) == 1
    return r if b else r + 1

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

if A >= B:
    print(1)
else:
    temp = 1
    i = 0
    while temp < B:
        temp += A-1
        i += 1
    print(i)
MN=input().split()
cont=0
M=int(MN[0]) #outs
N=int(MN[1]) #friends  
div=int(N/M)
if N>M:
  if (N%M)<N and (N%M)>0:
    cont=1 
  elif (N%M)==0: 
    cont=0
  print(cont+div)

elif N<M or N==M:
  cont=1
  print(cont)
from math import ceil
a, b = map(int, input().split())
ret = ceil((b-1)//(a-1))
print(ret)
A,B=map(int,input().split())
print(B//(A-1))
a,b = map(int, input().split())
print((b-0.1)//a+1)
A, B = map(int, input().split())


tmp = A * 1
if tmp >= B:
    print(1)
    exit()
for i in range(1, 21):
    tmp -= 1
    tmp += A
    if tmp >= B:
        print(i + 1)
        exit()
a, b = map(int, input().split())
if b % a == 0:
    print(b//a)
else:
    print(b//a+1)
x, y = 0, 0
for i in range(1, 101):
    if x + 2*i > 1500:
        y += 2*i
        x = 0
    print(x+i, y+1)
    x += 2*i
    y += 1
a,b = map(int,input().split())
c = 1
i = True

while i:
    if a < b:
        a = a + a 
        c += 1
    else:
        i = False

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

for i in range(b):
    if a*i >= b:
        print(i)
        break
A, B = map(int, input().split())

ans = 0
cnt = 0
while B > ans:
    ans += A
    cnt += 1

    if B <= ans:
        break

    else:
        ans -= 1

print(cnt)
a,b=map(int, input().split())
if b == 1:
    print(0)
else:
    print(-b//a*-1)
import math
AB = input().split()
A,B = int(AB[0]), int(AB[1])

n = (B - 1)/A + 1
print(math.floor(n))
#B - Power Socket
A,B = list(map(int,input().split()))

count = 0
total_plug = 1
for i in range(1,20):
    count += 1
    total_plug += (A - 1)
    if B <= total_plug:
        break
        
print(count)
A, B = [int(i) for i in input().split()]
count = A
result = 1
if A < B:
    while count <= B:
        if count == B:
            break
        else:
            count += A - 1
            result += 1
    print(result)

else:
    print(B//A)