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 numpy as np

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

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

    print(ans)

main()

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

Solution (Python):
num = list(map(int, input().split()))
if((num[1]-1)%(num[0]-1)==0):
    print((num[1]-1)//(num[0]-1))
else:
    print((num[1]-1)//(num[0]-1)+1)

Solution (Python):


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

if tgt == 0:
    print(1)
else:
    div = tgt // (a - 1)
    mod = tgt % (a - 1)
    print(div + 2 if mod > 0 else div + 1)

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

print(result)

Solution (Python):
a, b = [int(i) for i in input().split()]
c = 1
count = 0
while b > c:
  count += 1
  c += (a - 1)
print(count)

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

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

print(ans)

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

Solution (Python):
cnm = input().split()
a = int(cnm[0])
b = int(cnm[1])
s = 1
c = 0
while s<b:
    s += a - 1
    c += 1
print(c)

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

plug = 1
ans = 0

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

print(ans)

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

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

print(ans)

Solution (Python):
import math

i = list(map(int, input().split())) 

x = math.ceil((i[1] - 1) / (i[0] - 1))
print(x)

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

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

print(cnt)

Solution (Python):


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

Solution (Python):
import math

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

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

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

count = 0
flag = True
if B <= 1:
    flag = False
elif A >= B:
    flag = False
    count +=1
else:
    count +=1
while flag:
    if (A-1) * count + A >= B:
        count +=1
        break
    count +=1

print(count)

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

print(ans)

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

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

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

Solution (Python):
a, b = map(int, input().split())
tap_count = 1
a_count = 0
while tap_count < b:
  tap_count = tap_count + a - 1
  a_count = a_count + 1
print("{}".format(a_count))

Solution (Python):
from sys import exit, stdin
A, B = [int(_) for _ in stdin.readline().rstrip().split()]
ans = 0
socket = 1
while B > socket:
    socket += A - 1
    ans += 1
print(ans)

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

ans = 0
outlet = 1

while b > outlet:
    ans = ans + 1
    outlet = outlet + (a-1)
print(ans)

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

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

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

t = 1
ans = 0

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

print(ans)

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())
if (B-1)%(A-1)==0:
  print((B-1)//(A-1))
else:
  print((B-1)//(A-1)+1)

Solution (Python):
import math
s = list(map(int, input().split()))
print(math.ceil((s[1] - 1) / (s[0] - 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())

t = 1
count = 0

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

print(count)

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

x = 1
c = 0
while x < B:
    c += 1
    x += A - 1

print(c)

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

consent = 1
tap = 0

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

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

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

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

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

first = 1

ans = 0
count = 1

while (True):
    if count >= B:
        break
    else:
        count -= 1
        count += A
        ans += 1

print(ans)

Solution (Python):


import math

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


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

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

tap = 1
a_num = 0

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

print(a_num)

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





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

Solution (Python):


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

Solution (Python):
from collections import Counter,defaultdict
import sys,heapq,bisect,math,itertools,string,queue,datetime
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())

a,b = inpl()
if b == 1:
    print(0)
    quit()
b -= a
if b <= 0:
    print(1)
else:
    print(math.ceil(b/(a-1))+1)

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

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

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

print(num)

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

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 = list(map(int,input().split()))
a = 0
x = 1

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

print(a)

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

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

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

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

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

if (b-1) % (a-1) > 0 :
   c = c+1
print(c)

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 = map(int, input().split())

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

print(ans)

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

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

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

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

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

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

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

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

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

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

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

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

ans = 0
outlet = 1

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

print(ans)

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

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

print(a)

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

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

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

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

plus = A-1

B = B-1
ans = B // plus

if B%plus != 0:
    ans += 1

print(ans)

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

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

print(X)

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

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

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

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

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

Solution (Python):
a = input().split()

A = int(a[0])
B = int(a[1])

sum = 1
count = 0

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

print(count)

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

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

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


amari = (B-1)%(A-1)
ans = (B-1)//(A-1)

if amari==0:
  print(ans)

else:
  print(ans+1)

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

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

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());print((b+a-3)//(a-1))

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

count = 0
total = 1

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

print(count)

Solution (Python):
def power_sockets(A, B):
    s=0
    if B == 1:
        s = 0
    elif B <= A:
        s=1
    else:
        s=(B-A) // (A-1) + 1
        if (B-A) % (A-1) > 0:
            s = s + 1
    return s

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

Solution (Python):




import math
import statistics

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

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

print(b//a + 1)

Solution (Python):
A, B = input().split()
count = 0
sum = 1

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

print(count)

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

counter = 1
tap = 0

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

Solution (Python):
a, b = [int(i) for i in input().split()]
print(min([num for num in range(0, 20) if (a - 1) * (num - 1) + a >= b]))

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

Solution (Python):



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

    for i in range(20 + 1):
        if empty >= b:
            print(max(0, ans - 1))
            exit()
        else:
            ans += 1
            empty = i * a - ((i - 1))


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
def solve(a, b):
    return (a + b - 3) // (a-1)

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

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

print(n)

Solution (Python):
from sys import stdin
 
s,t =input().split()
count=int(s)
goal=int(t)
total=count
cnt=1

while total<goal :
	total=total+count-1
	cnt+=1

if goal==1:
  cnt=0
    
print(cnt)

Solution (Python):
import math

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

Solution (Python):
A, B = [int(i) for i in input().split()]
x = 0
if B != 1:
    while B > 0:
        B = B - A
        if B > 0:
            B = B + 1
        x = x + 1
print(x)

Solution (Python):

import math

def solve():
    A, B = list(map(int, input().split()))
    if B == 1:
        print(0)
    else:
        total = 1
        ans = 0
        while True:
            ans += 1
            total += (A-1)
            if total >= B:
                break
        print(ans)


if __name__ == "__main__":
    solve()

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

Solution (Python):
A,B = list(map(int,input().split()))
outlet = 1
cnt = 0

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

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

A -= 1
unused = 1
counter = 0
while unused < B:
    unused += A
    counter += 1
print(counter)

Solution (Python):
A, B = (int(i) for i in input().split(' '))
total = 1
count = 0
while True:
    if total >= B:
        print(count)
        break
    count += 1
    total = total + A - 1

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

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

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

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

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

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

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

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

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

Solution (Python):
x,y = map(int, input().split())
count = 1
num = 0

while count < y:
    count -= 1
    count += x
    num +=1
    
print(num)

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

Solution (Python):
import sys
input = sys.stdin.readline
a,b = map(int,input().split())
if b == 1:
  print(0)
  exit()
count = 1
tap = a
while tap < b:
  tap += a-1
  count += 1
print(count)

Solution (Python):
A,B=map(int,input().split())
n=(B-1)/(A-1)
if n>=1:
    if n==int(n):
        output=int(n)
    else :
        output=int(n)+1
elif n<1 and n>0:
    output=1
else:
    output=0
print(output)

Solution (Python):
from __future__ import print_function


import sys
input = sys.stdin.readline

def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)
    return

import math
import string
import fractions
from fractions import Fraction
from fractions import gcd

def lcm(n,m):
    return int(n*m/gcd(n,m))

import re
import array
import copy
import functools
import operator

import collections
import itertools
import bisect
import heapq


from heapq import heappush
from heapq import heappop
from heapq import heappushpop
from heapq import heapify
from heapq import heapreplace

from queue import PriorityQueue as pq

def reduce(p, q):
    common = fractions.gcd(p, q)
    return (p//common , q//common )



import random


def main():
    n_finger,n_required = map(int, input().split())
    n_finger = n_finger-1
    
    n_hub_prepare = ( n_required - 1 ) // n_finger
    
    if 1 + n_finger * n_hub_prepare < n_required :
        n_hub_prepare += 1

    print(n_hub_prepare)
    
    return

if __name__ == '__main__':
    main()

Solution (Python):
import sys
import math
from collections import defaultdict

sys.setrecursionlimit(10**7)
def input():
    return sys.stdin.readline()[:-1]

mod = 10**9 + 7

def I(): return int(input())
def II(): return map(int, input().split())
def III(): return list(map(int, input().split()))
def Line(N):
    read_all = [tuple(map(int, input().split())) for _ in range(N)]
    return map(list,zip(*read_all))



A,B = II()

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

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

Solution (Python):


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

ans=0
socket=1

while True: 
    if socket >= B:
        break
    else:
        socket += A - 1
        ans += 1

print(ans)

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

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

print(ans)

Solution (Python):
a, b = (int(i) for i in input().split())
count = 0
plug = 1
while plug < b:
  plug = plug + a - 1
  count += 1
print(count)

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

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

tap = 0

if b != 1:
    while(tap*(a-1) +1) < b:
        tap += 1

print(tap)

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

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

print(n)

Solution (Python):

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

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

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

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

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

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

res=(b-1)//(a-1)
if((b-1)%(a-1)>0):
  res+=1
  
print(res)

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

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

Solution (Python):
def solve(string):
    a, b = map(int, string.split())
    return str((b - 2) // (a - 1) + 1)


if __name__ == '__main__':
    print(solve(input()))

Solution (Python):
l = list(map(int,input().split()))
a = l[0]
b = l[1]
if b == 1:
    print(0)
else:
    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 = 1
time = 0
while(B > ans):
    ans -= 1
    ans += A
    time += 1

print(time)

Solution (Python):
from math import ceil

A,B = [int(zz) for zz in input().split()]

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

if B == 1:
    ans = 0

print(ans)

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

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

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())
ans = math.ceil((B-1) / (A-1))
print(ans)

Solution (Python):
a = list(map(int,input().split()))
print(-(-(a[1]-1)//(a[0]-1)))

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

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

Solution (Python):
ana,bnb = map(int, input().split())
bbb,i = 1,0
while bbb < bnb:
    bbb = bbb -1 + ana
    i += 1

print(i)

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

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

Solution (Python):
import math

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

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

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

for n in range(100):
  if n*A-(n-1) >= B:
    print(n)
    break

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

cnt=1
kuti=a

while kuti<b:
    cnt+=1
    kuti += a-1
   
if b==1:
    cnt=0

print(cnt)

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

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

Solution (Python):
import math
A,B = [int(i) for i in input().split()]
print(math.ceil((B-A)/(A-1)) + 1)

Solution (Python):
a, b = tuple([int(i) for i in input().split(' ')])
 
ans = 0
while True:
    if (a - 1) * (ans - 1) + a >= b:
        break
    if a == b:
        ans += 1
        break
    ans += 1
 
print(ans)

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

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

print(ans)

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

Solution (Python):
import itertools
a, b = [int(el) for el in input().split(' ')]

def f(n, x):
    if n == 0:
        return(1)
    else:
        return(n*x - (n-1))

for i in itertools.count(0):
    if f(i, a) >= b:
        print(i)
        break

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

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

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




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

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

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

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

    kuchi = a

    while kuchi < b :
        count+=1

        kuchi = (a - 1) * count + 1
    else :
        print(count)

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

count = 0
powerSocket = 1

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

print(count)

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

if b == 1:
  ans = 0
else:
  ans = math.ceil((b - 1) / (a - 1))

print(ans)

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

num_tap=0
num_source=1

while True:
  if num_source>=B: break
  num_tap += 1
  num_source += A-1
    
print(num_tap)

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

if b > 1:
    c = 1
    for i in range(1,21):
        c = c + (a - 1)
        if c >= b:
            print(i)
            break
else:
    print(0)

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

if b > 1:
    c = 1
    for i in range(1,21):
        c = c + (a - 1)
        if c >= b:
            print(i)
            break
else:
    print(0)

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

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

Solution (Python):
a = input("")
a, b = a.split()
a, b = int(a), int(b)
c, d = 0, 0
while d < b:
    if a == 0:
        break
    c += 1
    d = a * c - (c - 1)
if b == 1:
  c = 0
print(c)

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

ans = 0
outlet = 1

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

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

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

tap=1
count=0

if b==1:
  count==0

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

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



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

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

Solution (Python):
import math

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

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

Solution (Python):
import math

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

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

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

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

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

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

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

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

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

if (N[1]-1)%(N[0]-1)==0:
    print(int((N[1]-1)/(N[0]-1)))
else:
    print(int((N[1]-1)/(N[0]-1))+1)

Solution (Python):

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


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

Solution (Python):
s = input()
k = s.split(" ")
a = (int)(k[0])-1
b = (int)(k[1])
count = 0
n = 1
while(n<b):
  n+=a
  count+=1
print(count)

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

print(answer)

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

print(answer)

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

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

if b == 1:
	print(0)
else:
	r = a
	cnt = 1
	while r < b:
		r += (a-1)
		cnt += 1
	print(cnt)

Solution (Python):
A, B = [int(_) for _ in input().split()]
ans = (B - 2) // (A - 1) + 1
print(ans)

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

Solution (Python):
def _input():
    array  = input().split()
    return int(array[0]), int(array[1])

def result(actual, need):
    port = 1
    count = 0
    while  port < need:
        port -= 1
        port += actual
        count += 1
    return count

if __name__ == "__main__":
    actual, need = _input()
    print(result(actual, need))

Solution (Python):

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

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

temp = 1
res = 0

while b > temp:
    temp += a - 1
    res += 1

print(res)

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

print(k)

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

print(ans)

Solution (Python):
i=input();print(0--~-int(i[2:])//~-int(i[:2]))

Solution (Python):
i=input();print(-(~-int(i[2:])//-~-int(i[:2])))

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

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

if B == 1:
    print(0)

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

    print(ans)

Solution (Python):
if __name__ == '__main__':
    A, B = map(int, input().split())
    outlet = 1
    tap = 0
    while True:
        if outlet < B:
            outlet -= 1
            outlet += A
            tap += 1
        else:
            print(tap)
            break

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

socket = 1
ans = 0

while socket < B:
  socket += 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())
n=0
while 1 + a*n - n < b:
    n+=1

print(n)

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

Solution (Python):
from collections import Counter, defaultdict
import sys
sys.setrecursionlimit(10 ** 5 + 10)

from math import factorial
import heapq, bisect
import math
import itertools





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

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

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





if __name__ == '__main__':
    main()

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):
from sys import exit, stderr, stdin
input = stdin.readline


def debug(var, name="hoge"):
    print(name +":" + str(type(var)) + " = " + repr(var), file=stderr)
    return


def main():
    N, D = map(int,input().split())
    if (D==1):
        print(0)
        exit()
    D-=N
    ans = 1
    while(D>0):
        ans +=1
        D -= N-1
    print(ans)

if __name__ == "__main__":
    main()

Solution (Python):
import sys

a, b = map(int, input().split())
add_value = 0
outlet = 1
while outlet < b:
    outlet -= 1
    outlet += a
    add_value += 1

print(add_value)

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

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

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