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
import math

def solve(A: int, B: int):
    open = 1
    count = 0
    while(open<B):
        open -= 1
        open += A 
        count += 1
    print(count)
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)

if __name__ == '__main__':
    main()

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

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

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

print(i)

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

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

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

print(count)

Solution (Python):
def solve(inp):
    import math
    (A, B) = map(int, inp.readline().strip().split(' '))

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

    return str(r)


def main():
    import sys
    result = solve(sys.stdin)
    if result:
        print(result)


if __name__ == '__main__':
    main()

Solution (Python):
lst = list(map(int,input().split(" ")))
socket_n = 1
tap = 0
while socket_n < lst[1]:
  tap += 1
  socket_n = socket_n-1+lst[0]
print("%d" % tap)

Solution (Python):

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)

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

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

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

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






print(ans)

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

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

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

count = 0
val = 1
while val < B:
    val += A - 1
    count += 1

print(count)

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

Solution (Python):
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)

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

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

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

Solution (Python):
import math

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

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

current = 1
ret = 0
while current < B:
  current += A - 1
  ret += 1
  
print(ret)

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

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

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

Solution (Python):
A, B = map(int, input().split())
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)

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

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

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


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

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

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

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

print(i)

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

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

print(cnt)

Solution (Python):
a, b = map(int, input().split())
hole = 1
i = 0
check = True

while check:
    if hole >= b:
        check = False
    else:
        hole = a*(i + 1) - i
        i += 1

print(i)

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

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

Solution (Python):
def main():
    branch_num, target = map(int, input().split())
    result = 1
    count = 0
    while result < target:
        result += branch_num - 1
        count += 1
    print(count)


main()

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

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

a -= 1
c = 1

count = 0

while c < b:
    count += 1
    c += a

print(count)

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

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

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

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

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

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

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

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

cnt = 0
outlet = 1

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

print(cnt)

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

print(count)

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

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

    count = 1
    ans = 0

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

    print(ans)


if __name__ == '__main__':
    main()

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

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

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

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

print(count)

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

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

if b==1:
    print(0)
else:
    tap = 1
    n = a
    while n < b:
        n -= 1
        n += a
        tap+=1

    print(tap)

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

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

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

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

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

Solution (Python):
import math, string, itertools, fractions, heapq, collections, re, array, bisect, copy, functools, random
import sys
from collections import deque, defaultdict, Counter; from heapq import heappush, heappop
from itertools import permutations, combinations, product, accumulate, groupby
from bisect import bisect_left, bisect_right, insort_left, insort_right
from operator import itemgetter as ig
def main():
    sys.setrecursionlimit(10 ** 7)
    """inf = 10 ** 20; INF = float("INF"); ans = 0; tmp = 0; cnt = 0; ansli = []; tmpli = []; candili = []; stillset = set()
    eps = 1.0 / 10 ** 10; mod = 10 ** 9 + 7
    dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]; ddn = dd + [(-1, 1), (1, 1), (1, -1), (-1, -1)]; ddn9 = ddn + [(0, 0)]"""
    """for dx, dy in dd:
            nx = j + dx; ny = i + dy
                if 0 <= nx < w and 0 <= ny < h:"""
    def wi(): return list(map(int, sys.stdin.readline().split()))
    def wip(): return [int(x) - 1 for x in sys.stdin.readline().split()]
    def ws(): return sys.stdin.readline().split()
    def i(): return int(sys.stdin.readline())
    def s(): return input()
    def s_list(): return list(input())
    def hi(n): return [i() for _ in range(n)]
    def hs(n): return [s() for _ in range(n)]
    def mi(n): return [wi() for _ in range(n)]
    def num_grid(n): return [[int(i) for i in sys.stdin.readline().split()[0]] for _ in range(n)]
    def mip(n): return [wip() for _ in range(n)]
    def ms(n): return [ws() for _ in range(n)]
    def grid(n): return [s_list() for _ in range(n)]

    a, b = wi()
    print(((b - 1) + (a - 1) - 1) // (a - 1))


if __name__ == '__main__':
    main()

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

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

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

ans = 0
taps = 1
while taps < B:
    taps += A - 1
    ans += 1

print(ans)

Solution (Python):
import sys

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

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

ans = 1
taps = A
while True:
    if B <= taps:
        break
    ans += 1
    taps += A - 1

print(ans)

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

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

outlet = 1
res = 0

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

print(res)

Solution (Python):
"""
author : halo2halo
date : 10, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

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

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

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

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

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

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

if __name__ == '__main__':
    main()

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

outlet = 1
tap = 0
while outlet < B:
    outlet += A-1
    tap += 1

print(tap)

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

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

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

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

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

if __name__ == '__main__':
    main()

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

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

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

ans = 0
current = 1

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

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

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

ans = 0
current = 1

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

Solution (Python):
import sys
import math
import heapq
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()
def II(): return int(input())
def FLIST(n):
    res = [1]
    for i in range(1, n+1): res.append(res[i-1]*i%DVSR)
    return res
def gcd(x, y):
    if x < y: x, y = y, x
    div = x % y
    while div != 0:
        x, y = y, div
        div = x % y
    return y

A,B=LI()

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

Solution (Python):
import sys
import math
import heapq
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
DVSR = 1000000007
def POW(x, y): return pow(x, y, DVSR)
def INV(x, m=DVSR): return pow(x, m - 2, m)
def DIV(x, y, m=DVSR): return (x * INV(y, m)) % m
def LI(): return [int(x) for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LS(): return input().split()
def II(): return int(input())
def FLIST(n):
    res = [1]
    for i in range(1, n+1): res.append(res[i-1]*i%DVSR)
    return res
def gcd(x, y):
    if x < y: x, y = y, x
    div = x % y
    while div != 0:
        x, y = y, div
        div = x % y
    return y

A,B=LI()

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

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

for i in range(21):
  if d <= c*i-(i-1):
    print(str(i))
    break

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

Solution (Python):

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

if b == 1:
    ans = 0
else:
    ans = 1
    count = a
    while True:
        if count >= b:
            break
        else:
            
            count += (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):
from math import ceil


def main():
    A, B = map(int, input().split(" "))
    A += 1
    print(ceil((1 + B - A) / (A - 2)) + 1)


if __name__ == '__main__':
    main()

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

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

Solution (Python):
import math

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

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

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

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

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

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

Solution (Python):
a, b = [int(_) for _ in input().split()]
n = (b-1) // (a-1)
n += b > n*(a-1)+1
print(n)

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

	print(ans)


 
if __name__ == '__main__':
	main()

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

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

while True:
    if a[1] == 1:
        print(0)
        break
    
    if a[0] + (a[0]-1)*i >= a[1]:
        print(i+1)
        break
    else:
        i += 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())

tap = 1
ans = 0

while True:
    if tap<B:
        tap += (A-1)
        ans += 1
    else:
        break

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

plag = 1
count = 0
while True:
    if B <= plag:
        break

    plag += A - 1
    count += 1

print(count)

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

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

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

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

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

Solution (Python):
A,B = map(int, input().split())
for i in range(1000000):
  if (A-1)*(i-1)+A >= B:
    print(i)
    exit()

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

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

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

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

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

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

Solution (Python):



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


if B == 1:
    res = 0
else:
    res = 1
    tap = A
    while tap < B:
        tap += A - 1
        res += 1


print(res)

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

c = 1
count=0
while b > c:
  c += a-1
    
  count += 1
print(count)

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

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

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

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

print(ans)

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

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

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

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

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

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

Solution (Python):

import sys
sys.setrecursionlimit(10000000)
INF = 1<<32


def solve(A: int, B: int):
    from math import ceil
    print(ceil((B-A)/(A-1))+1)
    
    
    
    
    

    

    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    solve(A, B)

if __name__ == '__main__':
    main()

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

if (B-1)%(A-1)!=0:
    result+=1

print(result)

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

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

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

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

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

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

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

print(tap)

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

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

c = 0
a = 1
while a < B:
    a -= 1
    a += A
    c += 1
else:
    print(c)

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())
ans = 0
if B == 1:
    print(0)
    exit()
for i in range(10**100):
    if A+(A-1)*i < B:
        ans += 1
    else:
        ans += 1
        break
print(ans)

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

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

Solution (Python):


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

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

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

outlet = 1
n = 0

for i in range(100):
    if outlet >= b:
        print(n)
        break
    
    outlet -= 1
    outlet += a
    n += 1

Solution (Python):
a, b = map(lambda x: int(x), input().split())
count = 0
if b != 1 :
    mishi = a
    count = 1
    while mishi < b :
        mishi += a - 1
        count += 1


print(count)

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

ans = 0

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

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

if b==1:
    tmp = 0

else:
    tmp = 1

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

print(tmp)

Solution (Python):
a,b=(int(x) for x in input().split())
total=1
ans=0

while True:
	if total<b:
		ans+=1
		total+=a-1
	else:
		break

print(ans)

Solution (Python):
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    a,b=map(int,input().split())
    now=1
    ans=0
    while(now<b):
        now+=a-1
        ans+=1
    print(ans)
resolve()

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

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
(A, B), = [list(map(int, s.split())) for s in open(0)]

if B == 1:
    print(0)
elif A >= B:
    print(1)
else:
    cnt = 1
    while True:
        if B <= A + (A - 1)*(cnt - 1):
            break
        cnt += 1
    print(cnt)

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

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

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

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

Solution (Python):


import math

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





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

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

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

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

Solution (Python):

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

    print(ans)
    
if __name__ == '__main__':
    main()

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

Solution (Python):

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

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

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

def main():
    a, b = map(int, input().split())
    if b == 1:
        print(0)
        return None

    total = 1
    for i in range(1, 20):
        total += a - 1
        if total >= b:
            print(i)
            return None

if __name__ == '__main__':
    main()

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

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

count = 0; socket = 0
while True:
    if B <= 1:
        break
    socket += A
    count += 1
    if socket >= B:
        break
    socket -= 1

print(count)

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

cnt = 1
k = a

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

if b == 1:
  print(0)
else:
  print(cnt)

Solution (Python):
A, B = [int(i) for i in input().split()]
ret = 0
outlet = 1
while outlet < B:
    outlet -= 1
    outlet += A
    ret += 1
print(ret)

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

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

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

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

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

cnt = 0
tap = 1

if tap >= B:
    print(cnt)
    exit()

tap -= 1

while True:
    tap += A
    cnt += 1
    if tap >= B:
        break
    else:
        tap -= 1

print(cnt)

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

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

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

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

k = 1
for i in range(10**6) :
  if k >= b :
    print(i)
    sys.exit()
  k = k - 1 + a

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

i = 1

while True:
    s = A*i - (i - 1)
    
    if s >= B:
        break
    i += 1

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

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

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

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

i = 1

while True:
    s = A*i - (i - 1)
    
    if s >= B:
        break
    i += 1

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

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

i = 1

while True:
    if i == 1:
        s = A*i
    else:
        s = A*i - (i - 1)
    
    if s >= B:
        break
    i += 1

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

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

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


print(cnt)

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

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

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

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

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

count = 0
r = 1
while r<b:
    r += a-1
    count += 1

print(count)

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

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



wk = a -1
ans = ((b-1) *-1 // wk) * -1  

print(ans)

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

lest_taps = B - A


q, r = divmod(lest_taps, A-1)

if r == 0:
    output = q + 1
else :
    output = q + 2
    
print(output)

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

t = 0
p = 1
while True:
    if p >= B:
        break
    t += 1
    p -= 1
    p += A

print(t)

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

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

Solution (Python):
import sys
A,B = map(int,input().split())
ans = 0
for i in range(20):
    if 1+(A-1)*i >= B:
        print(i)
        sys.exit()

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

N = 0

while True:
    
    if (A - 1) * N + 1 >= B:
        break
        
    N += 1
    
    
print(N)

Solution (Python):


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

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

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

Solution (Python):
import sys

if sys.platform =='ios':
	sys.stdin=open('Untitled.txt')
input = sys.stdin.readline
def MAP(): return [int(s) for s in input().split()]

A, B = MAP()

def tap(n, a):
	return n+a-1

n = 1
count = 0
while n<B:
	n = tap(n,A)
	count += 1

print(count)

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

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

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

Solution (Python):
n=list(map(int,input().split()))
g=1
result=0
while g<n[1]:
    g=g+n[0]-1
    result+=1

print(result)

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

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

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

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

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

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

q, m = divmod(b-a, a-1)
print(q+1 if m == 0 else q+2)

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

    taps = 1
    sock = 1

    if B == 1:
        print(0)

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

        print(taps)

ABC139B_PowerSocket()