peterverebics/CodeNet_Python_118 huggingface dataset:
a, b= map(int, input().split())
x = a
y = 1
if b == 1:
    print(0)
else:
    while x < b:
        y += 1
        x += y*(a-1)
        print(x)
    print(y)
A,B=map(int, input().split())
N=1
while(1+(A-1)*N<B):
  N+=1
  
print(N)
[a,b] = [int(i) for i in input().split()]
if b%a == 0:
  print(b/a)
else:
  print(b//a +1)
a,b=map(int,input().split())

c=1
num=a
while num<b:
  num+=a
  num-=1
  c+=1
  
print(c)
x,y = map(int,input().split())
t = x
c = 0
for i in range(100):
    t += x-1
    c += 1
    if t>=y:
        print(c)
        break
a,b=map(int,input().split())
if b==1:
    print(0)
elif a<b-1:
    print(b//a+1)
else:
    print(1)
# coding:utf-8
A, B = map(int, input().split())
# 1個プラグが増えると未使用の差込口がA-1個増える
n = 0
b = 0
while b < B:
    n += 1 
    if n == 1:
        b += A
    else:
        b += A-1
print(n)
A,B=map(int,input().split())
s=B//A
if B%A==0 and B/A==1:
  n=1
else:
  n=B//A+1
print(n)
a, b = map(int, input().split())

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

ans = 1

if a >= b:
    print(1)
else:
    while (a + (a-1)*(ans-1)) < b:
        ans += 1
    print(ans)
x,y = map(int,input().split())
t = x
c = 1
for i in range(100):
    if t>=y:
        print(c)
        break
    t += x-1
    c += 1
    #print(t)
a, b = map(int,input().split())
print((b + a - 1)//a)
a, b = map(int, input().split())

if (a == b) :
  print(1)
elif (a >= b) :
  print(1)
else :
  ans = 0
  while(b >= 0) :
    b = b - a
    ans += 1
  print(ans)
A, B = map(int, input().split())
c = 1
tf = True
while tf:
    if (A*c-1) < B:
      c += 1
    else:
        tf = False
print(c)
A, B = map(int, input().split())

x = 1
ans = 0

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

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

for n in range(0,20):
    if n*a-n>b:
        break
if b==1:
    n=0
print(n)
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(count)
    print(result)

else:
    print(B//A)
#--power socket

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

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

print(j)
A, B = [int(i) for i in input().split()]
if B == 1:
    print(0)
else:
    if (B-1)%A == 0:
        print(((B-1)//A))
    else:
        print(((B-1)//A) + 1)
A,B = map(int,input().split())

print(int((B-1)/(A-1))) if (B-1)%(A-1)<=1 else print(int((B-1)/(A-1))+1)
import sys
from math import ceil, floor, sqrt, sin, cos, pi
from itertools import accumulate, permutations, combinations
from fractions import gcd # 最大公約数
from collections import deque, Counter
from operator import itemgetter
from heapq import heappop,heappush
sys.setrecursionlimit(10**7)
def lcm(x, y): return ((x * y) // gcd(x, y)) # 最小公倍数
# list(map(int, input().split()))

a, b = map(int, input().split())
ans = 0
cnt = 1
while True:
    cnt = cnt + a - 1
    ans += 1
    if cnt >= b:
        print(ans)
        sys.exit()
a,b = map(int, input().split())

ans = 0
flag = True
while flag:
  ans += 1
  if b <= (ans-1)*a + a:
    flag = False

print(ans)
a,b=map(int,input().split())
if b%a==0:
  print(b//a)
else:
  print(b//a + 1)
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
	while a*i < b:
		i += 1
	print(i)
	# n = int(input())
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 tap_num == 0:
        if a >= b: break
    else:
        if a + (a * tap_num -1) >= b: break
    
print(tap_num + 1)
a,b = map(int,input().split())
count = 0
if a >= b:
    print(1)
b = b - a
count +=1
while b > 0:
    b = b - (a-1)
    count += 1
print(count)
#a,b = map(int,input().split())
#A = list(map(int,input().split()))
a,b = map(int,input().split())
print((b-1)/(a-1))
a,b = map(int,input().split())
#f = 0
if b <= a:
    print(1)

else:
    som = a
    cnt = 1
    while (som < b):
        som = som + a
        cnt = cnt + 1
        if som < b:
            som = som - 1

        else:
            print(cnt)
            break
a,b = map(int,input().split())
i = 1
while (a*i - (i-1)) < b:
  i += 1
print(i)
a, b = map(int, input().split())

cnt = 1
total = a

if total == b:
    print(cnt)
    exit()

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

print(cnt)
a, b = map(int, input().split())
if b == 0:
    print(0)
else:
    ans = -(-b // a)
    print(ans)
a, b = map(int, input().split())
if b // a == a * (b // a):
    print(b // a)
if b == a:
    print(1)
if b // a != a * (b // a) and b // a < b and b != a:
    print(b // a + 1)
A,B=map(int,input().split())
C=1
if B==1:
    Ans=0
else:
    for i in range(20):
        C=C+(A-1)*(i+1)
        if C>=B:
            Ans=i+1
            break
        else:
            pass

print(Ans)
def solve():
    N, M = map(int, input().split())
    if N >= M:
        return 1
    
    ans = 1
    a = M - N
    while a > 0:
        a = a - (N-1)
        ans += 1
    
    return ans

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

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

print(n)
a, b = map(int, input().split())
if a >= b:
    print(1)
else:
    for i in range(1, 21):
      if (a*i) - (i-1) < b-1:
        continue
      else:
        break
    print(i)
import math

A,B = map(int,input().split())
print(math.ceil((B+1)/(A-1)))
a,b=map(int,input().split())
c=1
for x in range(100):
   c=c-1+a
   if b<=c:
       print(x+1)
       break
A,B = map(int,input().split())

n = 1
if A >= B:
    print(1)

elif A < B:
    for i in range(2,20):
        C = i*A - (i-1)
        if C >= B:
            print(i)
            break
A, B = map(int,input().split())
if B == 1:
  print("0")
elif B % A == 0:
  print(B /A)
else:
  print(B // A + 1)
A,B = map(int, input().split())
sumA = A
for i in range(1,100):
  if sumA >= B:
    print(i)
    break
  else:
    sumA += A
a,b = map(int, input().split())
x = 1
while True:
    if (a - 1) * (x -  1) + a < 8:
        x += 1
    else:
        print(x)
        break
A,B=map(int,input().split())
if B==1:
  print(1)
else:
  if B%A!=0:
    print(B//A+1)
  else:
    print(B//A)
m, n = input().split()
m, n = int(m), int(n)

c = 1
a = m
while a<n:
  n-=(a-1)
  a=m
  c+=1

print(c)
import sys
import math
a,b= map(int,input().split())
#N=int(input())
#a, b, c = [list(map(int, input().split())) for _ in range(3)]
#li0= [int(x) for x in input().split()]
i=0
c=b-a
if c<0:
  print("1")
  sys.exit()
if c%a==0:
  print((c//a)+1)
else:
  print((c//a)+2)
A,B = map(int,input().split())
if(A%B == 0):
    print(B/A)
else:
    print(B//A+1)
A, B = map(int, input().split())
 
if B%(A-1) == 1:
  print(int((B-1)/(A-1)))
else:
  print((B-1)//(A-1) +1)
#スペース区切りの整数の入力
A, B = map(int, input().split())

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

print(int(ans))
A, B = map(int,input().split())
ans = 0
for i in range(20):
	if ((A*(i+1))-i)>=B:
		ans = i+1 
		break
print(ans)
#B Power Socket
import math
a,b=map(int,input().split())
print(math.ceil(b+1/a))
import math

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

result =  a
cnt =1

while result < b:
    result += a-1
    cnt+=1
    
print(cnt)
a,b = map(int,input().split()) 
if a>=b:
  print(1)
elif (b-1)%(a-1)==0:
  print((b-1)//(a-1))
else:
  print((b-1)//(a-1)+1)
a, b = map(int,input().split(" "))
i = 1
while i >=1:
  d = (a-1)*i +1
  if d >= b:
    print(i)
    break
  else:
    i += 1
#!/usr/bin/env python3
import math

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

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

print(math.ceil(ans))
A,B = map(int,input().split())
flag = A
ans = 0
while flag <= B:
  flag += A - 1
  ans += 1
  
print(ans)
a,b = map(int,input().split())
total = 0
for i in range(20):
  total = a + i * (a - 1)
  if total >= b:
    print(i+1)
    break
A,B=map(int,input().split())
count=0

if A>=B:
  print(1)
else:
  count=B//A
  print(count+1)
#スペース区切りの整数の入力
A, B = map(int, input().split())

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

print(int(ans))
# coding: utf-8
import math

a, b = map(int, input().split())
if a >= b:
    print(1)
else:
    ans = math.ceil(b / a)
    if b <= ans * a:
      print(ans)
    else:
      print(ans+1)
a, b = map(int, input().split())
print(1) if a >= b else print(int(b / a + 1))
def main():
    A, B = map(int, input().split())
    ans = 0
    if B == 0:
        print(0)
        exit()
    while True:
        ans += 1
        if (A - 1) * ans + 1 >= B:
            break
    print(ans)


if __name__ == '__main__':
    main()
#-*-coding:utf-8-*-
import sys
input=sys.stdin.readline

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

    if b<=a:
        print(1)
        exit()
    
    for i in range(100):
        if b > a:
            count+=1
            b-=a-1
        elif b<=a:
            count+=1
            b-=a
            break
    print(count)

if __name__=="__main__":
    main()
a,b=map(int,input().split())
num=1
hoge=a
while hoge>=b:
  hoge+=a
  num+=1

print(num)
a,b = map(int,input().split())
sumA = a
count  =1
t = True
while t:
    if a< b:
        count +=1
    elif a >= b:
        t = False
    a += a-1
print(count)
# abc139_b.py
import math
A, B = map(int,input().split())
print(math.floor((B-A)/(A-1)+1))
A,B=[int(x) for x in input().rstrip().split()]
ans=A
cnt=1
while(ans<B):
  ans+=A-1
  cnt+=1
print(cnt)
a, b= map(int, input().split())
x = a
y = 1
if b == 1:
    print(0)
else:
    while x < b:
        y += 1
        x += (y-1)*(a-1)
    print(y)
#190901B
A, B = map(int, input().split())
ans=0
if B == 1:
    ans = 0

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())
total = A
ans = 1
while total < B:
    total += A-1
    ans += 1
print(ans)
a, b = map(int, input().split())
num = a
ans = 1
while num < b:
    num += a-1
    ans += 1
print(ans)
if __name__ == "__main__":
    A, B = list(map(int, input().split()))
    num_of_tap = 1
    while((A-1)*(num_of_tap-1) + A < B):
        num_of_tap += 1

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

ans = 0
if B % A == 0:
    ans = B // A
    print(ans)
else:
    ans = 1 + (B // A)
    print(ans)
a, b = map(int, input().split())
if (b == a ):
    print(1)
else:print(b // a + 1)
import sys
def input():
    return sys.stdin.readline()[:-1]

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

C = A//B + 1
print(C)
a,b = map(int,input().split())
if a >= b:
    print(1)
else:
    dum = b - a
    ans = 1
    syo,amari = divmod(dum,a-1)
    if amari != 0:
        ans += 1
    ans = ans + syo
    print(ans)
a,b=map(int,input().split())

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

tmp = b // a
for i in range(tmp, 20 + 1):
    if a * i - tmp <= b:
        print(i)
        exit()
a,b = map(int,input().split())

flag = 1

for i in range(100):
    tap = (a-1)*i + a
    if tap >= b:
        print(i+1)
        break
import math
A, B = map(int,input().split())
for i in range(20):
  if ((A-1)*i + A >= B):
    print(i+1)
    break
A,B = map(int,input().split())
A -= 1
if B % A == 0:
    print(B//A)
else:
    print(B//A+1)
a, b = map(int, input().split())

c = 0
s = 0
while s < b:
	c += 1
	if c == 1:
		s += a
	else:
		s += a-1
print (c)
# B - Power Socket

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

print(-(-(B + 1 ) // A))
import sys

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

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

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

amari = (b-a) % (a-1)
ans = int((b-a) / (a-1)) + 1
if amari == 0:
    print(ans)
else:
    print(ans+1)
A,B = map(int,input().split())
print((B-1)//(A-1) if (B-1)%(A-1)==0  else (B-1)//(A-1)-1)
def main():
    a, b = map(int, input().split())
    num = 1
    ans = 0
    for i in range(20):

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


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

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

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

ans = 0
for i in range(11):
    if A * i >= B:
        ans = i
        break
print(ans)
import math
A,B = map(int,input().split())
print(math.floor(B/(A-1)))
import sys
import math
a,b= map(int,input().split())
#N=int(input())
#a, b, c = [list(map(int, input().split())) for _ in range(3)]
#li0= [int(x) for x in input().split()]
i=0
c=b-a
if c<0:
  print("1")
  sys.exit()
if c%(a-1)==0:
  print((c//(a-1))+1)
else:
  print((c//(a-1))+2)
a, b = map(int, input().split())
c = b//a
print(c if b%a==0 else c+1)
a = list(map(int,input().split()))
i = 0

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

ans = A
for i in range(1000):
    if ans >= B:
        break
    else:
        ans += A-1
        
print(i+1)
a, b = map(int, input().split())
c = 1
if a >= b:
    print(1)
for i in range(1,b+1):
    if a*i-(i-1) >= b:
        break
    c += 1
print(c)
#!/usr/bin/env python3


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

if __name__ == '__main__':
    main()
import sys
import math

def main():

    input = sys.stdin.readline

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

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

i=1

while True:

    if 1+(a-1)*i >=b:
        print(i)
        exit(0)
    else:
        i+=1
import sys
import math

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

for I in range(math.ceil(B/A),21):
    if I*A-(I-1) >= B:
        print(I)
        sys.exit()
a, b = map(int, input().split())

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

count = math.ceil(b/a)
print(count)
from math import ceil

a, b = map(int, input().split())
print(ceil(b/a))
a, b = [int(i) for i in input().split()]

if a == b:
    print(1)
    exit()
misiyo = a - 1
kosuu = 0
while misiyo <= b - 1:
    kosuu += 1
    misiyo *= kosuu

print(kosuu)
import sys
input = sys.stdin.readline

#n = int(input())
#l = list(map(int, input().split()))

'''
A=[]
B=[]
for i in range():
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)'''
a, b = map(int, input().split())
flg=False
cnt=0
while not flg:
    if b-a<=0:
        flg=True
        break
    b-=a-1
    cnt+=1
print(cnt+1)
a,b=(int(x) for x in input().split())
i = 1
c = i*a
while c > b:
    i += 1
if a == b:
    print(1)
else:print(i+1)
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())
i = 1
while i * A < B:
    i += 1
print(i)
a,b = map(int,input().split())
tap = a
cnt = 1
while tap < b:
    cnt += 1
    tap += (a-1)
print(cnt)
import math
def main():
    A, B = map(int, input().split())
    cnt = 0
    while True:
        if B <= A:
            cnt += 1
            break
        else:
            if B > A - 1:
                B -= A - 1
                cnt += 1
    print(cnt)
main()
a,b=map(int,input().split())
if a>=b:
    print(1)
elif (a-b)%(a-1)==0:
    print((b-a)//(a-1)+1)
else:
    print((b-a)//(a-1)+2)
a, b= map(int, input().split())
x = a
y = 1
while x < b:
    x += (a-1)
    y +=1
print(y)
a, b = map(int, input().split())
now = a
ans = 1
while(now < b):
  now += a-1
  ans += 1
print(ans)
a,b = map(int,input().split())
som = 1
cnt = 0
f = 0
while(f == 0):
    som = som+a-1
    cnt = cnt+1
    if som >= b:
        f = 1
        break

print(cnt)
a,b = map(int,input().split())
mod = (b-a) % (a-1)
count = (b-a) // (a-1)

if a >= b:
    print(1)
else:
    if mod == 0:
        print(count + 1)
    else:
        print(count + 2)
A,B = input().split(' ')
if int(B) >1:
    num = 1
    while (int(A)-1)*(num -1) + 4 < int(B):
        num += 1
    print(num)
else:
    print(0)
A, B = map(int, input().split())

ans = B // A
if B % A != 0 and A <= B:
    ans += 1
print(ans)
a,b=map(int,input().split())
num=1
hoge=a
while b>=hoge:
  hoge+=a
  num+=1

print(num)
a, b = map(int, input().split())
n = 1
e = a
while n > 0:
  if e >= b:
    print(n)
    n = 0
  else:
    e += a-1
    n += 1
a, b = map(int, input().split())
c = 0
s = 1

while True:
    for e in range(1, s+1):
        c += 1
        s = s - 1 + e * a
        # print("c", c)
        # print("s", s)
        if s >= b:
            print(c)
            break
    else:
        continue
    break
#B Power Socket
import math
a,b=map(int,input().split())
print(math.ceil(b/a))
A, B = map(int, input().split())
 
if B%(A-1) == 1:
  print(int((B-1)/(A-1)))
else:
  print(int(B/(A-1)) +1)
a,b = map(int,input().split())
if a<b:
  for i in range(1,11):
    if i*a >= b:
      print(i)
if a==b:
  print(1)
A, B = map(int, input().split())
ans = int(B / A) + 1
if B % A == 0:
	ans -= 1
print(ans)
A, B = map(int,input().split())

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

cnt = 1

while(True):
    if A * cnt - (cnt -1) >= B:
        break
    
    cnt += 1
    
print(cnt)
a, b = [int(x) for x in input().split()]
print(1 - (a - b) / (a - 1))
def main():
    A, B = map(int, input().split())
    if B == 1:
        print("0")
        quit()
    print((B - A) // (A - 1))


if __name__ == "__main__":
    main()
a,b=map(int,input().split())
c=a-1
for i in range(1000):
    if b/a<=1:
        print(i+1)
        break
    else:
        a=a+c
x = input().split()

a = int(x[0])
b = int(x[1])

c = 1
outlet = a

while True:
  if(outlet > b):
    print(c)
    break
  elif(outlet < b):
    c = c + 1
    outlet = outlet + a - 1
A,B = map(int, input().split())

if A>=B:
    print(1)

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

print(ans)
a,b=input().split()
a=int(a)
b=int(b)
if 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())
i = 0
while a+(a-1)*i <=b:
  i += 1
print(i+1)
input = input().split(" ")
a, b = int(input[0]), int(input[1])
ans = -((-b-1) // (a-1))
print(ans)
a, b = map(int, input().split())
unused = a
cnt = 1
while unused < b:
  unused += a - 1
  cnt += 1
print(cnt)
a, b = map(int, input().split())

for i in range(20):
    c = a + (a - 1) * i
    if b <= c:
        print(i + 1)
        break
def main():
    A, B = map(int, input().split())
    ans = 0
    while True:
        ans += 1
        if (A - 1) * ans + 1 >= B:
            break
    print(ans)


if __name__ == '__main__':
    main()
a,b = map(int,input().split())
if b/a == 1:
  print(1)
else:
  print(-(-b/(a-1)))
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 = map(int, input().split())
print((b - 1) // (a - 1))
a,b = map(int,input().split()) 
if a>=b:
  print(1)
elif b%(a-1)==0:
  print(b//(a-1))
else:
  print(b//(a-1)+1)
A, B = map(int, input().split())
print((B-1)//(A-1))
A, B = map(int, input().split())

ans = A
for i in range(100):
    if ans >= B:
        break
    else:
        ans += A-1
        
print(i+1)
x,y = map(int,input().split())
t = x
c = 1
for i in range(100):
    t += x-1
    c += 1
    #print(t)
    if t>=y:
        print(c)
        break
A, B = map(int, input().split())

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

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

tmp = b // a + 1
for i in range(tmp, 20 + 1):
    if a * i - tmp <= b:
        print(i)
        exit()
a, b = map(int, input().split())
i = 1
while 1:
    if a<b:
        a*=i
        a+=1
        i+=1
    else:
        break
    
print(i)
a, b = map(int,input().split())

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

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

for i in range(1, 22):
    if (a-1) * i + 1 >= b:
        print(i)
        break
import math
def main():
    a,b=map(int, input().split())
    return math.ceil(b/a)

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

res = b // a + 1

if a == b:
  res = 1
  
print(res)
a,b = map(int ,input().split())
n =0

if b ==1:
    print(0)
else:
    while a*n < b:
        n +=1
        print(n)
from math import ceil
a, b = list(map(int , input().split()))
print(ceil(b/a))
a,b=map(int,input().split())
c=a
ans=1
while b>c:
    c+=a-1
    ans+=1
print(ans)
A,B = [int(i) for i in input().split()]
ans = 1
aa = A
while True:
    if aa >= B:
        print(ans)
        exit()
    aa += A-1
    ans +=1
import math
A, B = map(int, input().split())
print(math.ceil(B/A))
a,b=map(int,input().split())

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

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

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

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

# b -= a
# counter = 1
# while b > 0:
#     b -= a - 1
#     counter += 1

# print(counter)

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

while ans<b:
  ans+=a-1
  count+=1
  
print(count)
import math
A, B = map(int, input().split())
 
if B> A:
	print(math.ceil((B-1)//(A-1)))
else:
	print(1)
#-*-coding:utf-8-*-
import sys
input=sys.stdin.readline

def main():
    a,b = map(int,input().split())
    count=1
    plug=0

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

    plug+=a
    while True:
        if plug >= b:
            break
        plug+=a-1
        count+=1
#        print("count={},plug={}".format(count,plug))
    print(count)

if __name__=="__main__":
    main()
A,B = map(int,input().split())
 
for i in range(11):
  if (i*A -(i-1)) >= B:
    break
print(i)
a, b = map(int, input().split())
num = a
c = 1
while True:
    if num >= b:
        break
    else:
        num += a-1
print(c)
a,b = map(int,input().split())
count = 0
while  a * count < b:
    count += 1

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

ans = 1
outlet = a

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

print(ans)
def q2():
    """ B - Power Socket """
    A, B = (int(i) for i in input().split())
    d, m = divmod(B - A, A)
    if m > 0:
        d += 1
    print(d+1)


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

c = B % A
if A >= B:
  print(1)
  
  
elif c == 0:
  print( B//A)
  
else:
  print((B//A) + 1)
a,b = map(int,input().split())
if a!=b:
  print(int(b//a+1))
else:
  print('1')
A, B = map(int, input().split())
ans, cnt = 1, A
while (cnt < B):
    cnt += A - 1
    ans += 1
if (B <= A): print(1); exit(0)
print(ans)
import math
A,B=map(int, input().split())
ans=math.ceil(B/A)
print(ans)