Problem:
 Score : 200 points    Problem Statement Takahashi's house has only one socket.  Takahashi wants to extend it with some number of power strips, each with A sockets, into B or more empty sockets.  One power strip with A sockets can extend one empty socket into A empty sockets.  Find the minimum number of power strips required.      Constraints  All values in input are integers.  2 \leq A \leq 20  1 \leq B \leq 20         Input Input is given from Standard Input in the following format:  A  B       Output Print the minimum number of power strips required.        Sample Input 1 4 10      Sample Output 1 3  3 power strips, each with 4 sockets, extend the socket into 10 empty sockets.       Sample Input 2 8 9      Sample Output 2 2  2 power strips, each with 8 sockets, extend the socket into 15 empty sockets.       Sample Input 3 8 8      Sample Output 3 1

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy,copy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def main():
    a, b = MAP()
    print(1 + ceil((b-a) / (a-1)))

if  __name__=='__main__':
    main()

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

A, B = MAP()
print(ceil((B-1)/(A-1)))

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

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

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

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

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

Solution (Python):
def t(a, b):
    c = 1
    r = 0
    while c < b:
        c += a - 1
        r += 1
    return r


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

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

Solution (Python):
import math

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

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

ans = 0
use = (A-1)*ans + 1

while 1:
    if use >= B:
        print(ans)
        break
    ans += 1
    use = (A-1)*ans + 1

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

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

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

cn = 0
sa = 1

while(1):
    if(sa>=b):
        break
    sa += a-1
    cn += 1
    
print(cn)

Solution (Python):
A, B = tuple(int(num) for num in input().split())

sum = 1
p_count = 0

while sum < B:
  sum = sum + A-1
  p_count += 1
print(p_count)

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

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

while hole < B:
  hole = hole -1 + A
  plug += 1
print(plug)

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

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

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

Solution (Python):
A, B = map(int, input().split())
counter = 0
rem = 0
if B == 1:
    print(0)
elif A > B:
    print(1)
else:
    while rem < B:
        rem += A
        counter += 1
        if rem == B:
            break
        rem -= 1

    print(counter)

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

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

Solution (Python):
a,b=[int(i) for i in input().split()]

if b==1:
    ans=0
elif a>=b:
    ans=1
elif  (b-a)%(a-1)==0:
    ans=(b-a)//(a-1)+1
else:
    ans=(b-a)//(a-1)+2
print(ans)

Solution (Python):
import math

def main():
    a, b = [int(x) for x in input().split()]

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


if __name__ == '__main__':
    main()

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

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

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

print(ans)

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

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

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

print(answer)

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

Solution (Python):
import numpy as np
ls = np.array([[ 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
         0,  0,  0,  0,  0],
       [ 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,
         0,  0,  0,  0,  0],
       [ 0,  0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14,
        15, 16, 17, 18, 19],
       [ 0,  0,  1,  1,  2,  2,  3,  3,  4,  4,  5,  5,  6,  6,  7,  7,
         8,  8,  9,  9, 10],
       [ 0,  0,  1,  1,  1,  2,  2,  2,  3,  3,  3,  4,  4,  4,  5,  5,
         5,  6,  6,  6,  7],
       [ 0,  0,  1,  1,  1,  1,  2,  2,  2,  2,  3,  3,  3,  3,  4,  4,
         4,  4,  5,  5,  5],
       [ 0,  0,  1,  1,  1,  1,  1,  2,  2,  2,  2,  2,  3,  3,  3,  3,
         3,  4,  4,  4,  4],
       [ 0,  0,  1,  1,  1,  1,  1,  1,  2,  2,  2,  2,  2,  2,  3,  3,
         3,  3,  3,  3,  4],
       [ 0,  0,  1,  1,  1,  1,  1,  1,  1,  2,  2,  2,  2,  2,  2,  2,
         3,  3,  3,  3,  3],
       [ 0,  0,  1,  1,  1,  1,  1,  1,  1,  1,  2,  2,  2,  2,  2,  2,
         2,  2,  3,  3,  3],
       [ 0,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  2,  2,  2,  2,  2,
         2,  2,  2,  2,  3],
       [ 0,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  2,  2,  2,  2,
         2,  2,  2,  2,  2],
       [ 0,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  2,  2,  2,
         2,  2,  2,  2,  2],
       [ 0,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  2,  2,
         2,  2,  2,  2,  2],
       [ 0,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  2,
         2,  2,  2,  2,  2],
       [ 0,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,
         2,  2,  2,  2,  2],
       [ 0,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,
         1,  2,  2,  2,  2],
       [ 0,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,
         1,  1,  2,  2,  2],
       [ 0,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,
         1,  1,  1,  2,  2],
       [ 0,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,
         1,  1,  1,  1,  2],
       [ 0,  0,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,  1,
         1,  1,  1,  1,  1]])
A, B = map(int, input().split())
print(ls[A][B])

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

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

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

count=0
summary=1

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

print(count)

Solution (Python):
import math

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

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

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

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

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

Solution (Python):
import sys

a, b = map(int,input().split())
tap=1
kuchi=a
if b <= 1:
    print(0)
    sys.exit()
while kuchi < b:
    kuchi += (a-1)
    tap += 1

print(tap)

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

hole = 1
tap = 0

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

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

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

print(i)

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

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

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

Solution (Python):
import copy

def j(n):
    if n:print("yes")
    else:print("no")
    exit(0)
rem = 10 ** 9 + 7

"""
def ct(x,y):
    if (x>y):print("+")
    elif (x<y): print("-")
    else: print("?")
"""

def ip():
    return int(input())
def iprow():
    return [int(i) for i in input().split()]
def ips():
    return (int(i) for i in input().split())
def ipmultiplerow(n):
    a = []
    for i in range(n):
        a.append(ip())
    return a
def printrow(a):
    for i in a:
        print(i)

a,b = ips()
s = 1
n=0
while s<b:
    s+=(a-1)
    n+=1
print(n)

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

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

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

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

Solution (Python):
a, b = [int(i) for i in input().split()]

p, m = 1, 0
while p < b:
    p += (a - 1)
    m += 1

print(m)

Solution (Python):
a, b = [int(i) for i in input().split(" ")]

count = 0
slot = 1

while slot < b :
    slot = 1 + (a-1) * (count+1)
    count += 1

print(count)

Solution (Python):
a, b = [int(i) for i in input().split(" ")]

count = 0
slot = a

while slot < b :
    slot = a * (count+1) - count
    count += 1

if a >= b :
    count += 1


if b == 1 :
    count = 0

print(count)

Solution (Python):

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

c, d = 0, 1
while d < B:
    c += 1
    d += A - 1

print(c)

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

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

tap = 0
plug = 1

while plug < B:
	tap += 1
	plug = plug+A-1

print(tap)

Solution (Python):
mi = lambda : map(int, input().split())
li = lambda : list(map(int, input().split()))

import numpy as np

a, b = mi()
c=1

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

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

Solution (Python):
import sys
input = sys.stdin.readline
a,b = map(int, input().split())

cnt = 1
while True:
  if b<= 1:
    cnt = 0
    break
  elif b <= (a-1)*cnt+1:
    break
  cnt += 1
  
print(cnt)

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

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

cnt = 1
ans = 0

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

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

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

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

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

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

Solution (Python):
from sys import stdin
inp = stdin.readline().rstrip().split()
plg = 1
A = int(inp[0])
B = int(inp[1])
cnt = 0
while plg < B:
  plg = plg - 1 + A
  cnt += 1
print(cnt)

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

result = ((b-2)//(a-1)+1)

print(result)

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

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

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

Solution (Python):


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

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

print(tap)

Solution (Python):
def main():
    A, B = map(int,input().split())
    
    want_num = B - A

    if want_num % (A-1) == 0:
        print(int(1+want_num/(A-1)))
    else:
        print(int(2+want_num//(A-1)))


if __name__ == "__main__":
    main()

Solution (Python):
x=input()
X=x.split()
ans=0
if int(X[1])!=1:
    ans=1
    
a=int(X[0])
while int(X[0])<int(X[1]):
    ans+=1
    X[0]=int(X[0])+a-1
print(ans)

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

for n in range(21):
    x = (A-1) * n + 1
    if x >= B:
        print(n)
        break
    else:
        pass

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

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

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

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

count = 1
num = 0
while True:
	if(count >= B):
		break
	count = count -1 +A
	num += 1

print(num)

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

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

Solution (Python):
a,b = map(int,input().split())
c = 0
e = 0
while e == 0:
    for n in range(30):
        sum = a + (n-1)*(a-1)
        if sum < b:
            c += 1
        else:
            e += 1
print(c)

Solution (Python):
import math

A = list(map(int, input().split()))
a = A[1] - 1
b = A[0] - 1
n = math.floor(a / b)

if n == a / b:
    print(n)
elif n < a / b:
    print(n + 1)
else:
    print(1)

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

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

if B==1:
    ans =0    

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

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


def tap(x):
    return x - 1 + A


N = 1
M = 0
while N < B:
    N = tap(N)
    M += 1
print(M)

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

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

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

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

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

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

print(cnt)

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

Solution (Python):
import math

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

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

print(x)

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

Solution (Python):

import sys
import math



args = sys.argv
if len(args) == 2:
  from IPython import embed
  em = True
else:
  em = False




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






if em: sys.stdin = open('/dev/tty')






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

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

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

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

now = 1
for index in range(20):
    if now >= B:
        print(index)
        break

    now += 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())
for i in range(10**8):
  if (a-1)*i+1>=b:
    print(i)
    break

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

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

x,cnt =1,0

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

print(cnt)

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

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

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

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

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

print(i)

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

num=1
count=0

while  num<B:
     num+=A-1
     count+=1
else:
     print(count)

Solution (Python):
from math import ceil

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

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

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

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

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

cnt = 0
hole = a
if b==1:
    cnt = 0

elif b!=1 and a>=b:
    cnt = 1
else:
    for i in range(pow(2,10)):
            hole +=(a-1)
            
            if b<=hole:
                cnt = i+2
                break
            else:
                pass
print(cnt)

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

if B == 1:
  print(0)
elif A >= B:
  print(1)
else:
  while not ((A + ((A-1)*(ans-1))) >= B):
    ans += 1
  print(ans)

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

Solution (Python):
def func(A, B):
    i = 0
    tap = 1
    while (tap < B):
        tap += A - 1
        i += 1
    return i

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

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

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

Solution (Python):
import math

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

Solution (Python):
a = input().split()
soc = int(a[0])
num = int(a[1])
su = 1
count = 0
while su < num:
    su = su - 1 + soc
    count += 1
print(count)

Solution (Python):
A,B=map(int,input().split())
if B==1:
    print(0)
else:
    D=B-A
    N=1
    while D>0:
        D=D-(A-1)
        N+=1
    print(N)

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

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

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

ans = 0
available = 1
while True:
    if available >= b:
        break
    ans += 1
    available += a - 1

print(ans)

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

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

a = 1
cnt = 0

while True:
    if a >= B:
        print(cnt)
        exit()
    a = a - 1 + A
    cnt += 1

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

rest = b
count = 0
while rest > 1:
    rest -= a - 1
    count += 1

print(count)

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

Solution (Python):
s = input().split(" ")
a = int(s[0])
b = int(s[1])
c = 1
ans = 0

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

print(ans)

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

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

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

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

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

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

dif = A - 1

now = 1
ret = 0
while now < B:
	now += dif
	ret += 1
print(ret)

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

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

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

empty=1
i=0

while empty < b:
    empty += a-1
    i+=1
    
print(i)

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

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

Solution (Python):


import sys,collections,itertools,re,math,fractions,decimal,random,array,bisect,heapq





def solve(f):
    a, b = f.read_int_list()

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

    return ans


class Reader(object):
    def __init__(self, filename=None):
        self.file = open(filename) if filename is not None else None
        self.case = 1

    def __readline(self):
        return self.file.next().strip() if self.file else raw_input()

    def next_case(self):
        self.file.next()
        self.case += 1

    def read_int(self): return int(self.__readline())
    def read_float(self): return float(self.__readline())
    def read_long(self): return long(self.__readline())
    def read_decimal(self): return decimal.Decimal(self.__readline())
    def read_str(self): return self.__readline()

    def read_int_list(self): return map(int, self.__readline().split())
    def read_float_list(self): return map(float, self.__readline().split())
    def read_long_list(self): return map(long, self.__readline().split())
    def read_decimal_list(self): return map(decimal.Decimal, self.__readline().split())
    def read_str_list(self): return self.__readline().split()

if __name__ == '__main__':
    filename = sys.argv[1] if len(sys.argv) > 1 else None
    f = Reader(filename)
    if f.file:
        while True:
            print "Case 
            try:
                f.next_case()
            except StopIteration:
                break
    else:
        print solve(f)

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

count = ((B-1) + (A-2)) / (A-1)
print(int(count))

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

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

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

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A():
    s = S()
    t = S()
    ans = 0
    for i in range(3):
        if s[i] == t[i]:
            ans += 1
    print(ans)
    return


def B():
    a, b = LI()
    ans = 0
    b -= 1
    while b > 0:
        b -= a - 1
        ans += 1
    print(ans)

    return


def C():
    n = II()
    h = LI()
    i = 0
    ans = 0
    while i < n:
        down = i+1
        while down < n:
            if h[down - 1] >= h[down]:
                down += 1
            else:
                break
        ans = max(ans, down - i - 1)
        i = down
    print(ans)
    return


def D():
    n = II()
    print(n * (n - 1) // 2)
    return


def E():
    return


def F():
    return


if __name__ == '__main__':
    B()

Solution (Python):
import math 
a,b=[int(i) for i in input().split()]
if b == 1:print(0)
elif a>=b: 
	print(1) 
else: 
    b-=a 
    print(1+math.ceil(b/(a-1)))

Solution (Python):
import math 
a,b=[int(i) for i in input().split()]
curr = 1
tot = 0
while curr<b:
  curr += (a-1)
  tot += 1
print(tot)

Solution (Python):
A,B=map(int,input().split())
i=0
NT=1
while B > NT:
    NT += (A-1)
    i += 1
print(i)

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

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

for i in range(20):
    if B <= A*i-(i-1):
        count = i
        break

print(count)

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

A = lis_N[0]
B = lis_N[1]

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

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

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

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

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

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

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

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

amount = 1
count = 0

while list[1] > amount:
    count += 1
    amount += list[0] - 1

print(count)

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

ans = 0
rest = b

if b > 1:
  while True:
    ans += 1
    if rest <= a:
      break
    rest -= (a-1)

print(ans)

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

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

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

Solution (Python):
import math

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

Solution (Python):
A, B = map(int, input().split())
i = 1
total = 1
while True:
    if B <= 1:
        print(0)
        exit()

    total += A - 1
    if total >= B:
        print(i)
        exit()
    i += 1

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

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

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

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

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

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

sockets = 1
tap_num = 0
while(True):
    sockets = sockets - 1 + a
    tap_num += 1
    if sockets >= b:
        break

print(tap_num)

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


if __name__ == '__main__':
  main()

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

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

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

while slot < b:
    slot = slot+a-1
    tap  = tap+1

print(tap)

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

print(cnt)

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

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


tap_num  = (b-a) // (a -1 )
add_port = (b-a) %  (a -1 )

print(tap_num + 1 if add_port == 0 else tap_num + 2)

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

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

hole = 1
ans = 0

while hole < b:
    if ans == 0:
        hole = a
    else:
        hole += a-1
    ans += 1

print(ans)

Solution (Python):

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

Solution (Python):
S = input().split()
A = int(S[0])
B = int(S[1])
if B == 1:
    print(0)
    exit()
if A >= B:
    print(1)
    exit()
ans = (B-1) // (A - 1)
if (B-1) % (A-1) != 0:
    ans += 1
print(ans)

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

n = (b - 1) // (a - 1) + min([1, (b - 1) % (a - 1)])
print(n)

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

if b == 1:
    ans = 0

elif a >= b:
    ans = 1

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

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

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

Solution (Python):
A_B = list(map(int, input().split()))
ana = 1
n = 0

while ana < A_B[1]:
    n += 1
    ana -= 1
    ana += A_B[0]

print(n)

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