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



Sample input:
4 10


Sample output:
3

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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])

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

hole = 1
tap = 0

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

Submission status: Accepted

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

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

print(i)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(m)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

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

print(c)

Submission status: Accepted

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

Submission status: Accepted

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

tap = 0
plug = 1

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

print(tap)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

cnt = 1
ans = 0

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())  # 複数数値入力

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
p,c=1,0
while b>p:
      p=p-1+a
      c+=1
print(c)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

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

print(result)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# ABC139 B - Power Socket

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

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

print(tap)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(num)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
[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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

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

print(x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
import math
# import numpy as np
# from functools import lru_cache

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

# sys.setrecursionlimit(10000)

#### input
A, B = map(int, input().split())
# a = list(map(int, input().split()))
# a = list(map(lambda x: int(x)*(-1), a))  # 各要素を-1倍


# n = int(input())
# t = [int(input()) for i in range(n)]
if em: sys.stdin = open('/dev/tty')

#### function
# @lru_cache(maxsize=10000)

#### process
# if em: embed()
tmp = (A-1)
print(math.ceil((B-1)/tmp))
## heapsort, O(logN)
# import heapq
# heapq.heapify(A)
# min = heapq.heappop(A)
# heapq.heappush(A, new_element)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

    now += A - 1

Submission status: Accepted

Solution code:
# タップを1個使うごとにA-1個の未使用口が増える
import math
A, B = map(int, input().split())
print(math.ceil((B-1)/(A-1)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

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

x,cnt =1,0

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(i)

Submission status: Accepted

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

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

Submission status: Accepted

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

num=1
count=0

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

Submission status: Accepted

Solution code:
from math import ceil

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
import math

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

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

print(n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

a = 1
cnt = 0

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

dif = A - 1

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

Submission status: Accepted

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

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

Submission status: Accepted

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

empty=1
i=0

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/python
# -*- coding: utf-8 -*-
import sys,collections,itertools,re,math,fractions,decimal,random,array,bisect,heapq

# decimal.getcontext().prec = 50
# sys.setrecursionlimit(10000)
# MOD = 10**9 + 7

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 #%d\n"%f.case, solve(f)
            try:
                f.next_case()
            except StopIteration:
                break
    else:
        print solve(f)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
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')

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

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

    return

#C
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

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

#E
def E():
    return

#F
def F():
    return

#Solve
if __name__ == '__main__':
    B()

Submission status: Accepted

Solution code:
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)))

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(count)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

amount = 1
count = 0

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

print(count)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(tap)

Submission status: Accepted

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

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
#abc139B - Power Socket
A,B = list(map(int,input().split()))
count = 0
pluge = 1
while pluge < B:
    count += 1
    pluge += A-1
print(count)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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 ))

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
#p_3,p_4=map(int,input().split())
#n=int(input())
#S=input()
#T=input()
#recipe=[list(input().split())for _ in range(n)]
#m=int(input())
#have=[list(input().split())for _ in range(m)]
#s=[list(input())for _ in range(n)]
#h=list(map(int,input().split()))
#v=list(map(int,input().split()))
#c=list(map(float,input().split()))
#n=int(input())
#s=[list(map(int,input().split()))for _ in range(n)]
#s=[list(input().split())for _ in range(n)]
#s=[input()for _ in range(n)]
s=a-1
t=b-1
print((t+s-1)//s)