peterverebics/CodeNet_Python_118 huggingface dataset:
import math
N = int(input())
X_MAX = int(math.ceil(50000 / 1.08))

ans = ':('
for i in range(X_MAX + 1):
    if i * 1.08 == N:
        ans = i
        break

print(ans)
from decimal import Decimal
N = int(input())
M = round(N/Decimal(1.08))
if N == int(M*Decimal(1.08)) :
    print( int(M))
else :
    print(':(')
import math
n=int(input())
ans=math.ceil(n/1.08)
print(ans*1.08)
if int(ans*1.08)==n:
    print(ans)
else:
    print(":(")
n=int(input())
x=int(n/1.08)
if(round(1.08*x)==n):
    print(x)
else:
    print(":(")
N = int(input())
 
x = N // 1.08
 
if x*1.08 < N or x*1.08 > N+1:
  print(":(")
else:
  for y in range(x-1, x+1):
    if N+1> y*1.08 > N:
      print(y)
      break
    else:
      print(":(")
# N=1079
N=int(input())

ans=int(round((N/1.08)+0.05))

if (ans*1.08)//1 == N:
    print(ans)
else:
    print(":(")
N=int(input())

Len=int(N-N*0.1)
Ans=[]
for i in range(Len,N):
    j=i*1.08
    if int(j)==N:
        Ans.append(i)
        
if len(Ans)!=0:
    print(Ans[0])
else:
    print(":(")
import sys
N = int(input())
for n in range(N*100//110,N):
  if n*1.08//1 == N:
    print(n)
    sys.exit()
print(":(")
import sys
N = int(input())
x = int(N //1.1)
for i in range(x,N):
    if int(i*1.08)==N:
        print(i)
        sys.exit()
    
print(":(")
import math

N = int(input())
ans = int(int(math.ceil(N / 1.08)) * 1.08)
if N == ans:
    print(ans)
else:
    print(":(")
from sys import stdin
from math import ceil, floor
n=int(stdin.readline().rstrip())
min_ = n/1.08
max_ = (n+1)/1.08
if ceil(min_) == floor(max_):
    print(ceil(min_))
else:
    print(":(")
n=int(input())
a=int(n/1.08)
z=lambda x:int(x*1.08)
if z(a)==n:
  print(a)
if z(a+1)==n:
  print(a+1)
else:
  print(":(")
import math

n = int(input())
for i in range(1, n):
  if math.floor(i * 1.08) == n:
    print(i)
    exit()
print(':(')
import math
N = int(input())
M = N / 1.08
if math.floor(M) * 1.08 == N:
  print(math.floor(M*1.08))
else:
  print(':(')
import math
N = float(input())
cost1 = math.floor(N/1.08)
cost2 = cost1 * 1.08

if cost2 != N:
    print(':(')
else:
    print(cost1)
import math
n = int(1078)
a = math.ceil(n/1.08)
b = math.floor(a*1.08)
print(a*(n == b) or ":(")
import math
N = int(input())
result = float(N) / 1.08
result_int_floor = math.floor(result)
result_int_ceil = math.ceil(result)
if(math.floor(result_int_floor * 1.08) == N):
    print(result_int_floor)
elif(math.floor(result_int_ceil * 1.08) == N):
    print(result_int_ceil)
else:
    print(": (")
N=int(input())
flg=False
ans=0
for n in range(1, N+1):
  if (int(1.08*n) == N):
    ans=n
    flg=True
if flg:
  print(n)
else:
  print(':(')
n = int(input())

n_1 = n + 1

s = int(n // 1.08)
t = int(n_1 // 1.08)

print(s)
print(t)
if s % 1.08 == 0:
    print(s)
elif s != t:
    print(t)
else :
    print(':(')
N = int(input())
X = int(-(-N//1.08))
print(X)
if N == int(X * 1.08):
  print(X)
else:
  print(':(')
n=int(input())
ans=(n*100/108+0.5)//1
if (ans*1.08)//1==n:
  print(int(ans))
else:
  print(':(')
# -*- coding: utf-8 -*-

# N円の候補を羅列
N_list = list()
for n in range(1,50000):
    if(n*1.08 <= 50000):
        #小数点切り捨て
        print()
        N_list.append(int(n*1.08))
    else: break

# N円の支払い (1 ≤ N ≤ 50000)
N = int(input())
count = 0
for n in N_list:
    if(n == N):
        count = count + 1
    else: count = count

# 税抜き価格
if(count == 1): print(round(N/1.08))
else: print(':(')
N = int(input())
for X in range(int(N/1.1), N):
    if int(X * 10.8) == N:
        print(X)
        exit()
print(":(")
#!/usr/bin/env python3
import sys
import copy
from collections import deque


def main():

    n =int(input())
    for i in range(n):
        if int(i*1.08)==n:
            print(i)
            sys.exit(0)

    print(':(')


main()
import sys
import itertools
# import numpy as np
import time
import math
import heapq
from collections import defaultdict
from collections import Counter
sys.setrecursionlimit(10 ** 7)
 
INF = 10 ** 18
MOD = 10 ** 9 + 7
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

# map(int, input().split())

N = int(input())
for x in range(N):
    if math.floor(x * 1.08) == N:
        print(x)
        exit()
print(":(")
# N=1079
N=int(input())

a=N*100/108
b=(N+1)*100/108

if a+1 <b:
    print(round(a+0.5)//1)
else:
    print(":(")
import math

ans = -1
n = int(input())

for i in range(1, n):
    if math.floor(i * 1.08) == n:
        ans = i
        break

print(ans if ans != -1 else ":(")
import math
n = int(input())
x = math.floor(n/1.08)
if x*1.08 == n:
    print(x)
else:
    print(":(")
n=int(input())
x=n/1.08
nn=x*1.08
print(x)
print(nn)
if n<=nn<n+1:
    if x*10%10>=5:    
         print(int(x)+1)
    else:
        print(int(x))
else:
  print(":(")
N=int(input())
for i in range(N):
    if i*108//100==N:
        print(i)
        break
    elif i==N-1:
        print(":(")
        break
n = float(input())
n /= 1.08
if n % 10 != 0:
    print(':(')
else:
    print(int(n))
import math
n = int(input())
x = n/1.08
x1, x2 = math.floor( x ), math.ceil( x )
print(x1, x2)

if n == math.floor( x1 * 1.08 ) :
  print(x1)
elif n == math.floor( x2 * 1.08 ):
  print(x2)
else:
  print(':(')
import math
n = int(input())

a = math.floor(n / 1.08)
b = a + 1

aa = a * 1.08
bb = b * 1.08
if (aa == n):
    print(a)
else:
    if (bb == n):
        print(b)
    else:
        print(':(')
n = int(input())
for i in range(n):
         if int((i * 1.08) // 1) == n:
                  print(i)
                  exit()
print(":(")
import math
n = float(input())
m_low = math.ceil(n / 1.08)
m_high = math.floor((n+1)/1.08)
if m_low > m_high:
  print(':(')
else:
  print(m_low)
n=int(input())
x=n*100//108
if x==int(x):
	print(x)
else:
	print(':(')
N = int(input())
 
ans = ":("
for X in range(N-1):
  if N+1 > X * 1.08 >= N:
    ans = X
    break
  elif X * 1.08 > N+1:
    break
print(ans)
N=int(input())

for i in range(N):
    if int(i*1.08)==N:
        print(i)
        break

if all(int(i*1.08)!=N for i in range(N))==True:
    print(":(")
import numpy as np
N = int(input())
if N%27!=26 and N%27!=13:
  print(int(np.rint(N/1.08)))
else:
  print(':(')
n=int(input())
temp=int(n/1.08)
if int(temp*1.08)==n:
  print(temp)
else:
  print(":(")
n=int(input())
for i in range(n):
    if int(i*1.08) == n:
        print(i)
        exit()
print(':(')
n = int(input())
for i in range(n):
    if int(i*1.08) == n:
        print(i)
        break
else:
    print(":(")
def main():
    import sys
    def input(): return sys.stdin.readline().rstrip()
    n = int(input())
    r = n*100//108
    while r < n:
        u = 108*r//100
        if u == n:
            print(r)
            break
        elif u > n:
            print(':(')
            break
        r += 1


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

n = int(input())
print(math.ceil(n / 1.08))
def main():
    import math

    n = int(input())
    x, y = n / 1.08, (n + 1) / 1.08
    a, b = math.ceil(x), math.floor(y)
    if b < a:
        print(':(')
    else:
        print(a)


if __name__ == '__main__':
    main()
# N=1079
N=int(input())

ans=int(round((N*100/108)+0.5))

if int((ans*1.08)) == N:
    print(ans)
else:
    print(":(")
N=int(input())

Ans=[]
for i in range(N):
    j=i*1.08
    if int(j)==N:
        Ans.append(i)
        
if len(Ans)!=0:
    print(Ans[0])
else:
    print(":(")
import math
x = int(input())
ans = math.ceil(x/1.08)
if x == (ans * 1.08):
    print(ans)
else:
    print(":(")
N = int(input())

x = N//1.08

if x * 1.08 == int(N):
  print(x)
  
else:
  print(':/')
import math

N = int(input())

a = math.floor(N / 1.08)
b = a + 1

aa = math.floor(a * 1.08)
bb = math.floor(b * 1.08)

if(aa == N):
    print(aa)
elif(bb == N):
    print(bb)
else:
    print(":(")
N = int(input())
if N%27!=26 and N%27!=13:
  print(round(N/1.08))
else:
  print(':(')
N = int(input())

if int(N // 1.08 * 1.08) == N:
  print(N // 1.08)
elif int((N // 1.08 + 1) * 1.08) == N:
  print(N // 1.08 + 1)
else:
  print(":(")
import math
N = int(input())

res = []
for i in range(N):
    cal = math.floor(i * 1.08)
    if cal == N:
        res.append(i)
if len(res) == 0:
    print(':(')
else:
    print(res[0])
import math
n = int(input())
r = ":("
for i in range(50000):
    if math.floor(i*1.08) == n:
        print(i)
        exit()
    if math.floor(i*1.08) > n:
        break
print(-1)
import math

N = int(input())

if N % 13 == 0:
    print(':(')
else:
    print(math.floor((N+0.99)/1.08))
import math
n=int(input())
a=round(n/1.08)
if math.floor(a*1.08)==n:
    print(round(n/1.08))
else:
    print(":(")
a,b=map(int,input().split())
if b==1:
	print(0)
else:
	ans=1
	bb=b-a
	while bb>0:
  		bb=bb-(a-1)
  		ans+=1
	print(ans)
kuchi,total=map(int,input().split())

tap=0
while tap*kuchi-(tap-1)<total:
  tap+=1

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

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

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

B2 = B - A
A2 = A - 1
print(math.ceil(B2 / A2) + 1)
a,b = map(int,input().split())

socket = 1 
number = 0

if b == 1:
	print(0)
else:
	while True:
		number += 1
		socket = socket - 1 + a
		if socket >= b:
			print (number)
			break
from math import ceil
A, B = list(map(int, input().split()))
print(1 + ceil((B - A) / (A - 1)))
A, B = map(int, input().split())
n = 1
cnt = 0
while n < B:
    n += A-1
    cnt += 1
print(cnt)
import math
a, b = map(int, input().split())
print(1+math.ceil((b-a)/(a-1)))
A,B=map(int, input().split())
count=0
tap = 1
while(tap < B):
  tap += A-1
  count += 1
 
print(count)
a,b=map(int,input().split())
c=1
d=0
while c<b:
    d+=1
    c=a*d-(d-1)
print(d)
a,b=map(int,input().split())
b-=a
b=-(b//-(a-1))
print(b+1)
a, b = map(int, input().split())
ans = 0
tmp = 1
while tmp < b:
  tmp += a-1
  ans += 1
print(ans)
#!/usr/bin/env python3

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

ans = 0
kazu = 1
while B > kazu:
    ans += 1
    kazu = kazu - 1 + A

print(ans)
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    A, B = map(int, readline().split())
    print((B - 1 + A - 1 - 1) // (A - 1))

    return


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

if (b - 1) % (a - 1) == 0:
    print((b - 1) // (a - 1))
else:
    print((b - 1) // (a - 1) + 1)
a,b = map(int,input().split())
ans,sum = 0,1
while sum<b:
    sum+=a-1
    ans+=1
print(ans)
A,B=map(int,input().split())
count,outlet=0,1
while outlet<B:
    outlet-=1
    outlet+=A
    count+=1
print(count)
A, B = map(int, input().split())
import math
N = math.ceil((B-1)/(A-1))
print(N)
a, b = map(int, input().split())

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

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

print(int((b-2)/(a-1) +1))
a,b=map(int,input().split())
cnt=1
res=0
while 1:
  if cnt >= b:
    break
  cnt += a - 1
  res+=1
print(res)
import math
A, B = map(int, input().split())
print(math.ceil((B-1)/(A-1)))
import math
a,b=map(int,input().split())
print(math.ceil((b-1)/(a-1)))
A, B = map(int, input().split())
count, outlet = 0, 1
while outlet < B:
    outlet = outlet-1
    outlet = outlet+A
    count = count+1
print(count)
import sys
a, b = map(int, sys.stdin.readline().split())
print(-((a-b) // (a-1)) + 1)
import math
A,B=map(int,input().split())

print(int(math.ceil((B-1)/(A-1))))
a,b = map(int,input().split())
sumA = a
count  =1
ans = 0
while count < b:
    count -=1
    count +=a
    ans +=1
print(ans)
a,b = map(int,input().split())

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

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

print(ans)
import math

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

if B == 1:
    print(0)
else:
    ans = 0
    for i in range(B):
        ans += A
        if ans >= B:
            print(i+1)
            break
        ans -= 1
from math import ceil
a, b = map(int, input().split())
print(ceil((b - 1) / (a - 1)))
#!/usr/bin/env python
import sys
import re
from collections import deque, defaultdict
from itertools import combinations, combinations_with_replacement
import bisect
from math import factorial, sqrt, log, ceil, floor
sys.setrecursionlimit(1000000)


def main():
    input = sys.stdin.readline
    #N, M = map(int, input().split())
    #N, K = map(int, input().split())
    #ps = list(map(int, input().split()))

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

    num = 1
    cnt = 0
    while B > num:
        num -= 1
        num += A
        cnt += 1

    print(cnt)


if __name__ == '__main__':
    main()
a,b = map(int,input().split())
ans = 0
if b == 1:
    print(0)
    exit(0)
while b > 0:
    b-=a
    ans+=1
    if b<=0:break
    b+=1
print(ans)
A, B = map(int, input().split())
import math
c = math.ceil((B - A) / (A - 1))
print(c + 1)
def resolve():
    a, b = map(int, input().split())
    from math import ceil
    print(ceil((b - 1) / (a - 1)))


if __name__ == '__main__':
    resolve()
a,b=map(int,input().split())
ans=0
while a*ans-(ans-1)<b:
    ans+=1
print(ans)
A, B = map(int, input().split())

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

print(ans)
A,B=map(int,input().split())
tap=1
cnt=0
while tap<B:
    tap+=A-1
    cnt+=1
print(cnt)
a,b=map(int,input().split())
ans=0
c=1
while(c<b):
    c+=a-1
    ans+=1
print(ans)
a, b = map(int, input().split())
for i in range(20):
    if a*i-(i-1) >= b:
        print(i)
        break
import math
a,b = map(int,input().split())
count = 1
answer = 0
while count < b :
    count-=1
    count +=a
    answer +=1
print(answer)
a,b = tuple(map(int,input().split()))

if b==1:
  print(0)
else:
  t = a
  ans = 1
  for i in range(20):
    if t>=b:
      print(ans)
      break
    ans+=1
    t += a-1
def main():
    a,b=map(int,input().split())
    p=b-a
    if b==1:print(0)
    elif p<=0:print(1)
    else:
        if p%(a-1)==0:print((p//(a-1))+1)
        else:print((p//(a-1))+2)
main()
a, b = map(int, input().split())

s=a-1
t=b-1
ans=(t+s-1)//s
print(ans)
A, B = map(int, input().split())
def function(A, B):
    return (B-1+A-2)//(A-1)
  
print(function(A,B))
A, B = map(int, input().split())
for i in range(0, 21):
    if i*A - (i-1) >= B:
        print(i)
        break
A, B = map(int, input().split())
C = 0
while (True):
  if(A*C-C+1 >= B):
    break
  C += 1
print(C)
A,B = map(int,input().split())
for i in range(20):
  if 1+(A-1)*i>=B:
    print(i)
    exit()
a, b = map(int, input().split())

import math
ans = math.ceil((b-1)/(a-1))
print(ans)
def main():
    a, b = map(int, input().split())
    kuchi = 1
    ans = 0

    while kuchi < b:
        kuchi = kuchi - 1 + a
        #print(kuchi, a, b)
        ans += 1
    print(ans)
    
    
if __name__ == "__main__":
    main()
a, b = map(int, input().split())
sum = 1 
count = 0
while sum < b:
  sum += a - 1
  count += 1
print(count)
a, b = map(int, input().split())
for i in range(50):
    if  a * i  - (i-1) >= b:
        print(i)
        exit()
import math
A,B=map(int, input().split())

print(1+math.ceil((B-A)/(A-1)))
import math 
a,b=map(int,input().split())
print(math.ceil((b-1)/(a-1)))
import math
A, B = map(int, input().split())
print(1+math.ceil((B-A)/(A-1)))
from math import ceil
A, B = map(int, input().split())
print(ceil((B-1)/(A-1)))
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)
a,b = map(int, raw_input().split(' '))
q = 1
u = 0
while(q < b):
	q -= 1
	q += a
	u += 1
print u
a,b=map(int,input().split())
ans=0
k=1
while k<b:
  k=k-1+a
  ans+=1
print(ans)
a,b=map(int,input().split())

x = 1
ans = 0

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

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

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

if (B - 1) % (A - 1) == 0:
    ans -= 1

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

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

x = math.ceil((B - A) / (A - 1)) + 1
print(x)
def main() -> None:
    A, B = map(int, input().split())
    now, cnt = 1, 0
    while True:
        if now >= B:
            break
        now += A - 1
        cnt += 1
    print(cnt)


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

[A, B] = [int(x) for x in sys.stdin.readline().strip().split(" ")]

current = 1
result = 0
while current < B:
    result += 1
    current += A - 1

print(result)
A, B = input().split(' ')
A = int(A)
B = int(B)
if B == 1:
  print(0)
else:
  print(-(-(B-1) // (A-1)))
A, B = map(int, input().split())
K = 0
L = 0

while A*K-L+1 < B:
    K = K+1
    L = L+1
print(K)
import math
A,B = map(int,input().split())
print(math.ceil((B - A) / (A - 1)) + 1)
A,B=map(int,input().split())
ans=0
while(1):
  if 1+ans*(A-1) >= B:
    print(ans)
    break
  else:
    ans += 1
A, B = map(int, input().split())

A -= 1
B -= 1
print(-(-B // A))
a, b = map(int, input().split())
print(-(-(b-1)//(a-1)))
import math
A, B = list(map(int, input().split()))

print(math.ceil((B -1 ) / (A - 1)))
A=list(map(int,input().split()))
a=A[0]
b=A[1]
count=0
i=1
while i<b:
    count=count+1
    i=i+a-1
print(count)
from math import ceil
A, B = map(int, input().split())

ans = ceil((B - A) / (A-1)) + 1
# if B % A :
#     ans += 1

# elif B == A :
#     continue

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

count=0

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

print(count)
a, b = map(int, input().split())
ans = 0
outlets = 1
while outlets < b:
    outlets -= 1
    outlets += a
    ans += 1
print(ans)
A, B = map(int, input().split())
q = -((-B+1)//(A-1))
 
print(q)
a, b = map(int, input().split())

out = 1
i = 0
while(True):
    if out >= b:
        print(i)
        break
    else:
        out += a - 1
    i += 1
#B
import math
a,b = map(int,input().split())

k = math.ceil((b-1)/(a-1))

if b == 1:
    print(0)
elif a == b:
    print(1)
else:
    print(k)
import math
a,b = map(int,input().split())
print(math.ceil((b-1)/(a-1)))
#入力 A:使う1個当たりのタップの口数 B:最終的にここまで増やす差し込み口の数
A, B = list(map(int,input().split()))
#タップの必要数をans, 差し込み口の数をsocとする
ans = 0
soc = 1
#差し込み口はタップを使うと増えるが一つ使うと必ず1つ差し込み口を消費する。
while soc < B:
  soc -= 1
  ans += 1
  soc += A
#結果  
print(ans)
import numpy as np
import functools
import math
import collections
import scipy
import fractions
import itertools

def solve():
  a, b = map(int, input().split())
  if b <= 1:
    print(0)
  elif a >= b:
    print(1)
  else:
    print(math.ceil((b-a)/(a-1))+1)
  return 0
 
if __name__ == "__main__":
  solve()
# -*- coding: utf-8 -*-
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 = count - 1 + a
            count += (a - 1)
            ans += 1
print(ans)
#template
from collections import Counter
def inputlist(): return [int(j) for j in input().split()]
#template
A,B = inputlist()
ans = 0
count = 1
while True:
    if count >= B:
        break
    count += A-1
    ans +=1
print(ans)
import math
A, B = map(int, input().split())
print(math.ceil((B - A) / (A - 1)) + 1)
A, B = map(int, input().split())

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

else:
    for i in range(20):
       if B <= A+i*(A-1):
           print(1+i)
           exit()
A, B = map(int,input().split())
out = 1 
ans = 0

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

print(ans)
A,B=map(int,input().split())
C=1
if B==1:
    Ans=0
else:
    for i in range(20):
        D=C+(A-1)*(i+1)
        if D>=B:
            Ans=i+1
            break
        else:
            pass

print(Ans)
A,B = map(int,input().split())
tap = 0
plg = 1

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

if b == 1:
    print(0)
elif b <= a:
    print(1)
else:
    print((b - 2)//(a - 1) +1)
A, B = map(int, input().split())

empty = 1
num = 0
while empty < B:
    num += 1
    empty += (A-1)

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

n = 0
while (a*n-(n-1)) < b:
  n+=1
print(n)
import math
a, b = map(int, input().split())
print(math.ceil((b-1)/(a-1)))
A, B = map(int,input().split())
puragu = 1
if B == 1:
  print(0)
  exit()
if A >= B:
  print(1)
  exit()

result = 0

while puragu < B:
  puragu += A-1
  result += 1

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

consent = 1
ans = 0

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

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

cur = 1
ans = 0

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

print(ans)
A,B = map(int,input().split())
outlet = 1
cnt = 0
while outlet < B :
    outlet = outlet + A - 1
    cnt += 1
print(cnt)
import math
a, b = map(int, input().split())
x = math.ceil((b-a)/(a-1))+1
print(x)
A, B = map(int, input().split())
res = 1
cnt = 0
while res < B:
    res += A - 1
    cnt += 1
print(cnt)
a,b=map(int, input().split())
 
n=int((b-1)/(a-1))
if (b-1)%(a-1)==0:
    print(n)
else:
    print(n+1)
A,B = map(int,input().split())

i = 1
ans = 0

while i < B:
    i = i -1 + A 
    ans += 1
print(ans)
import math
A, B = map(int, input().split())

#  B <= 1 + (A - 1) * n
#  n >= (B - 1) / (A - 1)

print(math.ceil((B - 1) / (A - 1)))
a, b = map(int, input().split())
c = 1
d = 0
while c < b:
    c += a - 1
    d += 1
print(d)
A,B = map(int,input().split())

num = 1
res = 0
while num < B:
  res += 1
  num += A-1

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

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

if __name__ == "__main__":
    main()
a,b = map(int,input().split())
res = 1
cnt = 0
while res<b:
    res+=a-1
    cnt+=1
print(cnt)
A, B = map(int, input().split())
cnt = 0
tap = 0
outlet = 1
while outlet < B:
    tap += 1
    outlet -= 1
    outlet += A

print(tap)
a,b = map(int,input().split())
ans = 0
cnt = 1
while cnt < b:
    cnt -= 1
    cnt += a
    ans += 1
print(ans)
a,b = map(int,input().split())
som = 1
cnt = 0
f = 0
while(som < b):
    som = som+a-1
    cnt = cnt+1
    if som >= b:
        f = 1
        break

print(cnt)
a,b = map(int,input().split())
s = 1
cnt = 0
while (s < b):
    s = (s-1) + a 
    cnt += 1
print(cnt)
a, b = [int(i) for i in input().split()]
if b == 1:
    print(0)
    exit()
n = int((b-2) / (a-1))
print(n+1)
#!/usr/local/bin/python3
import math

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

print(math.ceil((B-1) / (A-1)))
a, b = map(int,input().split())
if b == 1:
  print(0)
  quit()
if a >= b:
  print(1)
  quit()
count = 0
while(True):
  count += 1
  if a + (a-1)*count >= b:
    print(count+1)
    quit()
a,b = map(int,input().split())
cnt = 1
c = b-a
if c >0:
    cnt += (c//(a-1))
    d = c%(a-1)
    if d != 0:
        cnt += 1
if b == 1:
    cnt = 0
print(cnt)
#!/usr/bin/env python3


import math

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

if __name__ == '__main__':
    main()
A, B = map(int, input().split())
if B >= 2:
    ans = 1
    tap = A
    while True:
        if tap >= B:
            break
        ans += 1
        tap += A-1
else:
    ans = 0
print(ans)
a, b = map(int, input().split())
print((a+b-3)//(a-1))
A, B = map(int, input().split(' '))
print((B + A - 3) // (A - 1))
A,B = map(int,input().split())
x = 1
ans = 0
while x < B:
    x += A-1
    ans += 1
print(ans)
a, b = map(int, input().split())
res = 0
out = 1
while out < b:
  out -= 1
  res += 1
  out += a
print(res)
# https://atcoder.jp/contests/abc139/tasks/abc139_b
a, b = map(int, input().split())

ans = 0
total = 1
while total < b:
    total -= 1
    total += a
    ans += 1
print(ans)
A, B = map(int, input().split())
ans = (B - A) // (A - 1) + 1
print(ans + 1 if (B - A) % (A - 1) else ans)
import math

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

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