Harryxun/stf_run huggingface dataset:
import sys


n = int(input())
l = [[int(i) for i in input().split()] for j in range(n)]


for i in range(0, 101):
    for j in range(0, 101):
        for k in range(n):
            c = 0
            dict = {}
            if l[k][2] != 0:
                h = l[k][2] + abs(i - l[k][0]) + abs(i - l[k][1])
                c += 1
                if h in dict:
                    dict[h] += 1
                else:
                    dict[h] = 1
        if dict[h] == c:
            print(i, j, k)
            sys.exit()

### FIXED CODE ###

import sys


n = int(input())
l = [[int(i) for i in input().split()] for j in range(n)]


for i in range(0, 101):
    for j in range(0, 101):
        ans = 1
        for k in range(n):
            if l[k][2] != 0:
                h = l[k][2] + abs(i - l[k][0]) + abs(j - l[k][1])
                break
        for k in range(n):
            if l[k][2] != max(h - abs(i - l[k][0]) - abs(j - l[k][1]), 0):
                ans = 0
        if ans:
            print(i, j, h)
            sys.exit()
from functools import reduce
from math import gcd
n=int(input())
A=list(map(int,input().split()))
lc=reduce(lambda a,b: a*b//gcd(a,b),A)
b=[lc//i for i in A]
print(sum(b)%(1000*1000000+7))


### FIXED CODE ###

from functools import reduce
from fractions import gcd
n=int(input())
A=list(map(int,input().split()))
lc=reduce(lambda a,b: a*b//gcd(a,b),A)
b=[lc//i for i in A]
print(sum(b)%(1000*1000000+7))
N, M = map(int, input().split())

if M == 0:
    print(0)
    exit()

es = [[] for i in range(M)]
for i in range(M):
    a, b = map(int, input().split())
    a,b = a-1, b-1
    es[a].append(b)
    es[b].append(a)

def dfs(v, visited, es, cnt):

    #print("--------------")
    #print((v, visited, cnt))

    if cnt == N-1:
        return 1
    ret = 0
    for i in es[v]:
        if visited[i] == True:
            continue

        visited[i] = True
        ret += dfs(i, visited, es, cnt+1)
        visited[i] = False

    return ret

visited = [False] * N
visited[0] = True

ans = dfs(0,visited,es,0)
print(ans)

### FIXED CODE ###

import copy
n,m = map(int, input().split())


paths = [[] for _ in range(n)]
for i in range(m):
  a,b = map(int, input().split())
  paths[a-1].append(b-1)
  paths[b-1].append(a-1)
  
ans = 0

checked = [False for _ in range(n)]


def solve(i, c):
  c[i] = True

  global ans
  if c.count(False) == 0:
    ans += 1
    return
  else:
    for j in paths[i]:
      if c[j] == False: 
        solve(j, copy.deepcopy(c))
        
      

        
solve(0, copy.deepcopy(checked))
print(ans)
    
#print(paths[0])
K, N = int(input())
A = list(map(int, input().split()))
m = K + A[0] - A[N-1]
for i in range(N-1):
  d = A[i+1] - A[i]
  if d > m:
    m = d
print(K-m)


### FIXED CODE ###

K, N = map(int, input().split())
A = list(map(int, input().split()))
m = K + A[0] - A[N-1]
for i in range(N-1):
  d = A[i+1] - A[i]
  m = max([d, m])
print(K-m)
def divide(n):
    counter = 0
    counter1 = 0
    if n % 2 != 0:
        for i in range(1, n+1, 2):
            for j in range(1, i+1):
                if i % j == 0:
                    counter += 1
            if counter == 8:
                counter1 += 1
            counter = 0
    else:
        for i in range(1, n, 2):
            for j in range(1, i+1):
                if i % j == 0:
                    counter += 1
            if counter == 8:
                counter1 += 1
            counter = 0
    return counter1

                         
if __name__ == '__main__':
    n = int(input())
    print(divide(n))

### FIXED CODE ###

a, b = map(int, input().split())
print((a - 1) * (b - 1))
l =input();
l = int(l);
print((L/3)^3)

### FIXED CODE ###

l = input();
l = int(l);
print((l/3)**3)
prime = [2,3,5,7,11,13,17,19,23,29,31]
pow = [1]
for p in prime:
  i=1
  while p**i<=1000:
    pow.append(p**i)
    i += 1
X = int(input())
x = X
while x>0:
  if x in pow:
    ans = x
    break
  x -= 1
print(ans)

### FIXED CODE ###

s = input()
K = int(input())
l = min(len(s),K)
lis = []
for i in range(1,l+1):
  for j in range(len(s)-i+1):
    lis.append(s[j:j+i])
lis = list(set(lis))
lis.sort()
print(lis[K-1])
#include<iostream>

int selection_sort(int A[], int N) {
  int i, j, tmp, sw = 0, min_i;
  for (i = 0; i < N-1; i++) {
    min_i = i;
    for (j = i+1; j < N; j++) {
      if (A[j] < A[min_i]) min_i = j;
    }
    tmp = A[i];
    A[i] = A[min_i];
    A[min_i] = tmp;
    if (i != min_i) sw++;
  }
  return sw;
}

int main() {
  int A[100], i, N, sw;

  std::cin >> N;
  for (i = 0; i < N; i++) std::cin >> A[i];

  sw = selection_sort(A, N);
  
  for (i = 0; i < N; i++) {
    if (i > 0) std::cout << ' ';
    std::cout << A[i];
  }
  std::cout << std::endl;
  std::cout << sw << std::endl;

  return 0;
}


### FIXED CODE ###

def selection_sort(A, N):
    cnt = 0
    for i in range(N):
        min_j = i
        for j in range(i, N):
            if A[j] < A[min_j]:
                min_j = j
        if i != min_j:
            A[i], A[min_j] = A[min_j], A[i]
            cnt += 1        
    return A, cnt


N = int(input().rstrip())
A = list(map(int, input().rstrip().split()))

A, cnt = selection_sort(A, N)
string = list(map(str, A))
print(' '.join(string))
print(cnt)
A,B,M = list(map(int,input().split()))
a = list(map(int,input().split()))
b = list(map(int,input().split()))
x = [list(map(int,input().split())) for _ in range(M)]

ans = min(a)+min(b)
for i1,i2,discount in x:
    sum = a[i1-1]+a[i2-1]-discount
    ans = min(ans,sum)

print(ans)

### FIXED CODE ###

def main():
    A,B,M = list(map(int,input().split()))
    a = list(map(int,input().split()))
    b = list(map(int,input().split()))
    x = [list(map(int,input().split())) for _ in range(M)]

    ans = min(a)+min(b)
    for i1,i2,discount in x:
        sum = a[i1-1]+b[i2-1]-discount
        ans = min(ans,sum)

    print(ans)

if __name__ == '__main__':
    main()
n=input()
a=len(n)
p=0
m=0
while True:
    m+=int(n[p])
    p+=1
    if m==a:
        break
if int(n)%m==0:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

n=input()
p=0
m=0
while True:
    m+=int(n[p])
    p+=1
    if p==len(n):
        break
if int(n)%m==0:
    print('Yes')
else:
    print('No')
import numpy
from scipy.special import comb
import collections

n = int(input())
a = list(map(int,input().split()))

cumulative_sum = numpy.cumsum(a)
cumulative_sum = numpy.append(cumulative_sum, 0)
count = collections.Counter(cumulative_sum)

ret = 0
for v in count.values():
    ret += int(comb(v, 2))
print(ret)




### FIXED CODE ###

import numpy
from scipy.misc import comb
import math
import collections

n = int(input())
a = list(map(int,input().split()))

cumulative_sum = numpy.cumsum(a)
cumulative_sum = numpy.append(cumulative_sum, 0)
count = collections.Counter(cumulative_sum)

ret = 0
for v in count.values():
    if v < 2:
        continue
    ret += math.factorial(v) // (math.factorial(v - 2) * math.factorial(2)) 
print(ret)
n = int(input())
mod = 10**9+7
def Fac(x):
  return x*Fac(x-1)%mod if x != 0 else 1
print(Fac(n))

### FIXED CODE ###

import math
n = int(input())
mod = 10**9+7
print(math.factorial(n)%mod)
n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n+1):
  if i==0 or i==n & a[i-1] != a[i]:
    if i!=0:
      ans += cnt // 2
    cnt = 1
  else:
    cnt += 1
print(ans)

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
ans = 0
for i in range(n+1):
  if i==0 or i==n or a[i-1] != a[i]:
    if i!=0:
      ans += cnt // 2
    cnt = 1
  else:
    cnt += 1
print(ans)
N = int(input())
A = list(map(int, input().split()))

hats = A[:]
d = {}
for h in hats:
    d[h] = True

h1 = hats[0]
 
def search(now1, now2, count):
    now1, now2 = now2, now1^now2
    if now2 in d:
        if now2 == h1:
            if count == N:
                return True
            else:
                return search(now1, now2, count+1)
        else:
            return search(now1, now2, count+1)
    else:
        return False
    

ans = False
for h2 in hats[1:]:
    if search(h1, h2, 2):
        ans = True

if ans:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))

hats = A[:]
import copy
from collections import defaultdict
d = defaultdict(lambda: 0)

for h in hats:
    d[h] += 1

def f():
    if len(d) == 3:
        xor = 0
        for key in d:
            xor ^= key
        if xor == 0:
            lsit_d = list(d.keys())
            if d[lsit_d [0]] == d[lsit_d [1]] and d[lsit_d [0]] == d[lsit_d [2]]:
                return 'Yes'
            else:
                return 'No'
        else:
            return 'No'

    if len(d) == 1:
        lsit_d = list(d.keys())
        if lsit_d [0] == 0:
            return 'Yes'
        
    if len(d) == 2:
        if d[0] * 2 == N - d[0]:
            return 'Yes'
    
    return 'No'
    
print(f())
N = int(input())
K = list(str(input()))
count=0


for i in range(N):  
  if K[i] == "A":
    if K[i+1] == "B":
      if K[i+2] == "C":
        count += 1

print(count)

### FIXED CODE ###

N = int(input())
K = list(str(input()))
count=0


for i in range(N):  
  if K[i-2] == "A":
    if K[i-1] == "B":
      if K[i] == "C":
        count += 1

print(count)
n,k=map(int,input())

a=n-k

print(a)

### FIXED CODE ###

n,k=map(int,input().split())

a=0

if k != 1:
  a=n-k
 
print(a)
a,b=map(int, input().split())
ans=0
for i in range(a+1):
    for j in range(a-i+1):
        if 10000*i+5000*j+1000*(a-i-j)==b and ans==0:
            print(f'{i} {j} {(a-i-j)}')
            ans+=1
if ans==0:
    print(f'-1 -1 -1')

### FIXED CODE ###

a,b=map(int, input().split())
ans=0
for i in range(a+1):
    for j in range(a-i+1):
        z=a-i-j
        if 10000*i+5000*j+1000*z==b and ans==0:
            print(i,j,z)
            ans+=1
if ans==0:
    print(-1,-1,-1)
import re

a = input()
if re.match('(.*)keyence', a):
  print("YES")
else:
  if re.match('k(.*)eyence', a)
    print("YES")
  else:
    print("NO")


### FIXED CODE ###


ll = [1, 9, 7, 4]

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

if ( a in ll ):
  ll.remove(a)
  if ( b in ll ):
    ll.remove(b)
    if ( c in ll ):
      ll.remove(c)
      if ( d in ll ):
        print("YES")
      else:
        print("NO")
    else:
      print("NO")
  else:
    print("NO")
else:
  print("NO")
import sys
import numpy as np

def can_reach_the_goal(u, x):
    return min(u) >= x

n, m, x = map(int, input().split())

c = []
a = []
u = [0]*m
u_sum = [0]*n
for i in range(n):
    ca = [int(row) for row in input().split()]
    c.append(ca[0])
    a.append(ca[1:])
    u_sum[i] += sum(a[i])
    for j in range(m):
        u[j] += a[i][j]

if not can_reach_the_goal(u, x):
    print(-1)
    sys.exit(-1)

idx_c = list(np.argsort(-1 * np.array(c)))
c_sum = sum(c)
for i in idx_c:
    u_tmp = [u[j] - a[i][j] for j in range(m)]
    if can_reach_the_goal(u_tmp, x):
        c_sum -= c[i]
        u = u_tmp

print(c_sum)

### FIXED CODE ###

def can_reach_the_goal(u, x):
    return min(u) >= x

n, m, x = map(int, input().split())

c = []
a = []
for i in range(n):
    ca = [int(row) for row in input().split()]
    c.append(ca[0])
    a.append(ca[1:])

INF = 10**7
min_cost = INF
for k in range(2**n):
    purchase = [True if c == '1' else False for c in list(format(k, '0{}b'.format(n)))]
    cost = 0
    u = [0]*m
    for i in range(n):
        cost += c[i] if purchase[i] else 0
        for j in range(m):
            u[j] += a[i][j] if purchase[i] else 0

    if can_reach_the_goal(u, x) and cost < min_cost:
        min_cost = cost

if min_cost == INF:
    print(-1)
else:
    print(min_cost)
S = raw_input().split(' ')
S[0] = int(S[0])
S[1] = int(S[1])

d = str(a//b)
r = str(a%b)
f = str(a/b)

print(d + " " + r + " " + f)

### FIXED CODE ###

S = raw_input().split(' ')
S[0] = int(S[0])
S[1] = int(S[1])
 
d = str(S[0]/S[1])
r = str(S[0]%S[1])
f = format(1.0*S[0]/S[1], ".8f")
 
print(d + " " + r + " " + f)
a, b = map(int, input().split())
result = 0
while result * a + 1 > b:
  result ++
print(str(result))

### FIXED CODE ###

a, b = map(int, input().split())
result = 0
while result * (a - 1) + 1 < b:
  result = result + 1
print(str(result))
a=list(map(int,input().split()))
b=int(input())
a.sort()
print(a[0]+a[1]+(a[2]*2**b)

### FIXED CODE ###

a=list(map(int,input().split()))
b=int(input())
a.sort()
print(a[0]+a[1]+(a[2]*(2**b)))
(a,b)=input(),input()
c=a-b+1
print(c)


### FIXED CODE ###

a,b=map(int,input().split())
t=a-b+1
print(t)
W,H,N = map(int,input().split())

x1 = 0
x2 = W
y1 = 0
y2 = H
rectangle_S = W*H
black_S = 0
judge = 1 #1:黒部分全部でない,0:黒部分全部

for i in range(N):
  x,y,a = map(int,input().split())
  if(a == 1):
    if(x < x1):
     balck_S += 0
     x1 = x1
    elif(x1 <= x <= x2):
     black_S += (x-x1)*(y2-y1)
     x1 = x
    elif(x2 < x):
     black_S = W*H
     break      
  elif(a == 2):
    if(x < x1):
     black_S = W*H
     judge = 0
    elif(x1 <= x <= x2):
     black_S += (x2-x)*(y2-y1)
     x2 = x
    elif(x2 < x):
     black_S += 0
     x2 = x2   
  elif(a == 3):
    if(y < y1):
     balck_S += 0
     y1 = y1
    elif(y1 <= y <= y2):
     black_S += (y-y1)*(x2-x1)
     y1 = y
    elif(y2 < y):
     black_S = W*H
     judge = 0   
  elif(a == 4):
    if(y < y1):
     black_S = W*H
     break
    elif(y1 <= y <= y2):
     black_S += (y2-y)*(x2-x1)
     y2 = y
    elif(y2 < y):
     black_S += 0
     y2 = y2
  #print(x1,x2,y1,y2,black_S)
if(judge == 0):
  print(0)
else:
  print(rectangle_S - black_S)


### FIXED CODE ###

W,H,N = map(int,input().split())

x1 = 0
x2 = W
y1 = 0
y2 = H
rectangle_S = W*H
black_S = 0
judge = 1 #1:黒部分全部でない,0:黒部分全部

for i in range(N):
  x,y,a = map(int,input().split())
  if(a == 1):
    if(x < x1):
     black_S += 0
     x1 = x1
    elif(x1 <= x <= x2):
     black_S += (x-x1)*(y2-y1)
     x1 = x
    elif(x2 < x):
     black_S = W*H
     break      
  elif(a == 2):
    if(x < x1):
     black_S = W*H
     judge = 0 #黒全部
    elif(x1 <= x <= x2):
     black_S += (x2-x)*(y2-y1)
     x2 = x
    elif(x2 < x):
     black_S += 0
     #x2 = x2   
  elif(a == 3):
    if(y < y1):
     black_S += 0
     y1 = y1
    elif(y1 <= y <= y2):
     black_S += (y-y1)*(x2-x1)
     y1 = y
    elif(y2 < y):
     black_S = W*H
     judge = 0   
  elif(a == 4):
    if(y < y1):
     black_S = W*H
     judge = 0 #黒全部
    elif(y1 <= y <= y2):
     black_S += (y2-y)*(x2-x1)
     y2 = y
    elif(y2 < y):
     black_S += 0
     #y2 = y2

if(judge == 0):
  print(0)
else:
  print(rectangle_S - black_S)
import math

N = int(input())

li = []

for i in range(N):
    x, l = map(int, input().split())
    li.append([x-l,x+l])

li.sort(key=lambda x:x[1])
li.sort(key=lambda x:x[0])

ans = 0
t = 0 - 10**9 + 99
for i in range(N):
    if t <= li[i][0]:
        ans += 1
        t = li[i][1]

print(ans)


### FIXED CODE ###

import math

H = int(input())
W = int(input())
N = int(input())

k = max([H,W])
ans = math.ceil(N/k)

print(ans)
N = int(input())
li = []
while len(li) <N:
  li.append(input())
print(len(set(lottery))

### FIXED CODE ###

N = int(input())
li = []
while len(li) <N:
  li.append(input())
print(len(set(li)))
a=input()
a=int(a)
if a==3:
  print("YES")
if a==5:
  print("YES")
if a==7:
  print("YES")
  else:
    print("NO")

### FIXED CODE ###

a=int(input())
if a==3 or a==5 or a==7:
  print("YES")
else:
  print("NO")
l=[list(map(int,input().split())) for _ in range(2)]
homework=0
for i in range(l[0][1]):
    homework=homework+l[1][i]
free=l[0][0]-homework
if free<0:
    print(-1)
else:
    print(free)

### FIXED CODE ###

import math
R=int(input())
print(2*math.pi*R)
l=[]
total=0
for i in range(5):
    t=int(input())
    if t%10 == 0:
        total +=t
    else:    
        total +=(t//10+1)*10
        b=(t//10+1)*10-t
        l.append(b)
a=max(l)
print(total-a)

### FIXED CODE ###

l=[]
total=0
a=0
for i in range(5):
    t=int(input())
    if t%10 == 0:
        total +=t
    else:    
        total +=(t//10+1)*10
        a=max(a,10-(t%10))
print(total-a)
import sys
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
MOD = 1000000007
def POW(x, y): return pow(x, y, MOD)
def INV(x, m=MOD): return pow(x, m - 2, m)
def DIV(x, y, m=MOD): 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())

N=II()

st=set()
prevset=set()
for i in range(N):
    x,y,h=LI()
    st = set()
    for i in range(101):
        for j in range(101):
            if not h == 0:
                st.add((i,j, h+abs(x-i)+abs(y-j)))

    prevset = st if not prevset else st.intersection(prevset)
    if len(prevset) == 1:
        break

print(*prevset.pop())


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)
INTMAX = 9223372036854775807
INTMIN = -9223372036854775808
MOD = 1000000007
def POW(x, y): return pow(x, y, MOD)
def INV(x, m=MOD): return pow(x, m - 2, m)
def DIV(x, y, m=MOD): 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())

N=II()



inl = [LI() for i in range(N)]
inl.sort(key=lambda x: x[2], reverse=True)

st=set()
prevset=set()
for x,y,h in inl:
    st = set()
    for i in range(101):
        for j in range(101):
            abso = abs(x-i)+abs(y-j)
            if not h == 0:
                st.add((i,j, h+abso))
            else:
                for k in range(1, abso+1):
                    st.add((i,j, k))

    prevset = st if not prevset else st.intersection(prevset)
    if len(prevset) == 1:
        break

print(*prevset.pop())
N,M=map(int,input().split())
S=list(map(int,input()))

dp=[[] for _ in range(N+1)]
dp[0]=(0,[])
for i in range(1,N+1):
  if S[i]==0:
    cand=[]
    for j in range(1,M+1):
      if S[i-j]==1:
        continue
      elif i-j<0:
        break
      cand.append((dp[i-j][0]+1,dp[i-j][1]+[j]))
    cand.sort()
    #print(i,cand)
    if cand:
      dp[i]=cand[0]
    
#print(dp)
if dp[-1]:
  print(*dp[-1][1])
else:
  print(-1)

### FIXED CODE ###

import sys
N,M=map(int,input().split())
slist=list(map(int,input()))

seq=0
for s in slist:
  if s==0:
    seq=0
  else:
    seq+=1
    if seq==M:
      print(-1)
      sys.exit(0)

#####segfunc#####
def segfunc(x,y):
  return min(x,y)

#####ide_ele#####
ide_ele=float("inf")

class SegTree:
  """
  init(init_val, ide_ele): 配列init_valで初期化 O(N)
  update(k, x): k番目の値をxに更新 O(logN)
  query(l, r): 区間[l, r)をsegfuncしたものを返す O(logN)
  """
  def __init__(self, init_val, segfunc, ide_ele):
    """
    init_val: 配列の初期値
    segfunc: 区間にしたい操作
    ide_ele: 単位元
    n: 要素数
    num: n以上の最小の2のべき乗
    tree: セグメント木(1-index)
    """
    n = len(init_val)
    self.segfunc = segfunc
    self.ide_ele = ide_ele
    self.num = 1 << (n - 1).bit_length()
    self.tree = [ide_ele] * 2 * self.num
    # 配列の値を葉にセット
    for i in range(n):
      self.tree[self.num + i] = init_val[i]
    # 構築していく
    for i in range(self.num - 1, 0, -1):
      self.tree[i] = self.segfunc(self.tree[2 * i], self.tree[2 * i + 1])

  def update(self, k, x):
    """
    k番目の値をxに更新
    k: index(0-index)
    x: update value
    """
    k += self.num
    self.tree[k] = x
    while k > 1:
      self.tree[k >> 1] = self.segfunc(self.tree[k], self.tree[k ^ 1])
      k >>= 1

  def query(self, l, r):
    """
    [l, r)のsegfuncしたものを得る
    l: index(0-index)
    r: index(0-index)
    """
    res = self.ide_ele

    l += self.num
    r += self.num
    while l < r:
      if l & 1:
        res = self.segfunc(res, self.tree[l])
        l += 1
      if r & 1:
        res = self.segfunc(res, self.tree[r - 1])
      l >>= 1
      r >>= 1
    return res
  
seg=SegTree([float("inf")]*(N+1), segfunc, ide_ele)
seg.update(N,0)

for i in reversed(range(N)):
  if slist[i]==0:
    left=i+1
    right=min(i+M,N)
    seg.update(i,seg.query(left,right+1)+1)

dist_list=[]
for i in range(N+1):
  dist_list.append(seg.query(i,i+1))
#print(dist_list)

answer_list=[]
i=0
while i<N:
  for j in range(1,M+1):
    if dist_list[i]>dist_list[i+j]:
      answer_list.append(j)
      i+=j
      break
    
print(*answer_list)
S = input()
if(len(S) >= 4 and A[:4] == "YAKI"):
    print("Yes")
else:
    print("No")


### FIXED CODE ###

S = input()
if(len(S) >= 4 and S[:4] == "YAKI"):
    print("Yes")
else:
    print("No")
A,B,K = input().split()
print(f"{0 if A <= K else A - k} {0 if B <= K else B-k}")


### FIXED CODE ###

cookies = [int(x) for x in input().split()]
leftOver = cookies[0] - cookies[2]
takahashi = max(0, leftOver)
print(str(takahashi)+ ' ' + (str(cookies[1]) if takahashi > 0  else str(max(0,cookies[1] - abs(leftOver)))))
A, B = map(int, intput().split())

K = 1
ans = 0

while(K < B):
	K -= 1
	L += A
	ans += 1

print(ans)

### FIXED CODE ###

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

ans = 0
consent = 1

while consent < B:
    ans += 1
    consent -= 1
    consent += A
print(ans)
N,M = map(int,input().split())
Alist = list(map(int, input().strip().split()))
r = [0]*N
r[0] = Alist[0]
for i in range(1,len(Alist)):
    r[i] = r[i-1] + Alist[i]
for i in range(len(r)):
    r[i] = r[i]%M
p = [0] * M
for i in range(len(r)):
    p[r[i]] = p[r[i]] + 1    
def combi(n):
    if n == 0:
        return 0
    if n == 1:
        return 0
    else:
        return (n*(n-1))/2
s = 0
for i in range(len(p)):
    s = s + combi(p[i])
s = s + p[0]
print(int(s))

### FIXED CODE ###

N,M = map(int,input().split())
Alist = list(map(int, input().strip().split()))
r = [0]*N
r[0] = Alist[0]
for i in range(1,len(Alist)):
    r[i] = r[i-1] + Alist[i]
for i in range(len(r)):
    r[i] = r[i]%M
r.sort()
p = []
m = 0
for i in range(len(r)-1):
    m = m+1
    if r[i] != r[i+1]:
        p.append(m)
        m = 0
    if i == len(r)-2:
        p.append(m+1)
x = 0
for i  in range(len(r)):
    if r[i] == 0:
        x = x +1
def combi(n):
    if n == 0:
        return 0
    if n == 1:
        return 0
    else:
        return (n*(n-1))/2
s = 0
for i in range(len(p)):
    s = s + combi(p[i])
s = s + x
print(int(s))
N = int(input())
A = [int(i) for i in input().split()]
  
O = [0] * 4

for i in range(N):
  for j in range(N):
    if i == j:
      continue
    O[i] ^= A[j]

print(O)

### FIXED CODE ###

N = int(input())
SUM = 0
A = []
O = []
for i in input().split():
  i = int(i)
  SUM ^= i
  A.append(i)

for a in A:
  O.append(SUM ^ a)

print(' '.join([str(s) for s in O]))
a = int(input())
b = int(input())
ls = [1,2,3]
del ls[a-1]
del ls[b-1]
print(ls)

### FIXED CODE ###

a =sorted( [int(input()) for i in range(2)])
print("1" if a == [2,3] else "2" if a == [1,3] else "3")
s = input()
ans = []

for i, j in enumerate(s):
    if j in ["0", "1"]:
        ans.append(j)
    else:
        if len(ans):
            del ans[i - 1]

print("".join(ans))

### FIXED CODE ###

s = input()
ans = []

for i in s:
    if i in ["0", "1"]:
        ans.append(i)
    else:
        if len(ans):
            ans.pop()

print("".join(ans))
w, h, x, y, r = map(int, input().split())

if x >= r and < x <= (w-r):
    if y >= r and y <= (h-r):
        print("Yes")
    else:
        print("No")
else:
    print("No")


### FIXED CODE ###

w, h, x, y, r = map(int, input().split())

if x >= r and x <= (w-r):
    if y >= r and y <= (h-r):
        print("Yes")
    else:
        print("No")
else:
    print("No")
n,s=int(input()),input()
a=[s[0]=="E"]
for i in s[1:]:a.append(a[-1]+(i=="E"))
m=999999
for i in range(n):m=min(m,a[:i]+((n-i-1)-(a[-1]-a[i])))
print(m)


### FIXED CODE ###

n,s=int(input()),input()
a=[0]
for i in s:a.append(a[-1]+(i=="W"))
m=999999
for i in range(1,n+1):m=min(m,a[i-1]+((n-i)-(a[-1]-a[i])))
print(m)
S, T = input().split()
print(*[s+t for s,t in zip(S,T)], sep='')

### FIXED CODE ###

N = int(input())
S, T = input().split()
list = []
for i in range(0,N):
    list.append(S[i])
    list.append(T[i])
print(*list, sep='')
import sqrt from math
N=int(input())
for i in range(int(sqrt)+1,-1,-1):
    if N%i==0:
        print(i-1+N//i-1)
        exit()


### FIXED CODE ###

from math import sqrt
N=int(input())
for i in range(int(sqrt(N))+1,-1,-1):
    if N%i==0:
        print(i-1+N//i-1)
        exit()