Harryxun/stf_run huggingface dataset:
R,G,B,N =map(int,input().split())

cnt =0
    
for r in range(N+1):
    
    for g in range(N+1):
        
        if r*R+g*G > N:
            continue
            
        temp = N - r*R-g*G
            
        if temp%B ==0:
            cnt+=1
    
print(cnt)
            

### FIXED CODE ###

R,G,B,N =map(int,input().split())

cnt =0
    
for r in range(int(N/R)+1):
  ball = N-r*R 
  for g in range(int(ball/G)+1):
    res = N- (r*R+g*G)
    if  res >=0 and res%B ==0:
      cnt+=1
    
print(cnt)
a,b=[int(i) for i in input().split()]

if a==b:
    print("H")
else:
    print("D")

### FIXED CODE ###

a,b=input().split()

if a==b:
    print("H")
else:
    print("D")
def main():
    N = int(input())
    slimes = list(map(int, input().split()))
    ans = 0

    for i in range(1, N):
        if slimes[i-1] == slimes[i]:
            slimes[i] = 10001 + ans
            assert slimes[i] != slimes[i-1]
            assert slimes[i] != slimes[i+1]
            ans += 1

    print(ans)


if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    N = int(input())
    slimes = list(map(int, input().split()))
    ans = 0

    for i in range(1, N):
        if slimes[i-1] == slimes[i]:
            slimes[i] = 10001 + ans
            # assert slimes[i] != slimes[i-1]                                 
            # assert slimes[i] != slimes[i+1]                                 
            ans += 1

    print(ans)


if __name__ == '__main__':
    main()
x = input()
x**3


### FIXED CODE ###

x = input()
x = int(x)
print(x**3)
s= input()
ss ="CODEFESTIVAL2016"
t = 1
for i in range(s):
  if s[i]==ss[i]:
    t +=1
print(t)

### FIXED CODE ###

s= input()
ss ="CODEFESTIVAL2016"
t = 0
for i in range(len(ss)):
  if s[i]!=ss[i]:
    t +=1
print(t)
n=int(input())
l=[0 for i in range(n+1)]
for i in range(1,n+1):
 
    for j in range(i,n+1,i):
 
        l[j]+=1
c=0
for i in range(1,n+1):
    c+=i*l[i]
 
print(c)

### FIXED CODE ###

N,M,K=map(int,input().split())
A=list(map(int,input().split()))
B=list(map(int,input().split()))
a=[0]
b=[0]
for i in range(N):
	a.append(a[i] + A[i])
for i in range(M):
	b.append(b[i] + B[i])
ans, j = 0, M
for i in range(N + 1):
	if a[i] > K:
		break
	while b[j] > K - a[i]:
		j -= 1
	ans = max(ans, i + j)
print(ans)
from collections import deque

h, w = map(int, input().split())
a = [list(input()) for _ in range(h)]

d = [[-1] * w for _ in range(h)]
que = deque()
for i in range(h):
    for j in range(w):
        if a[i][j] == '#':
            que.append((j, i))
            d[i][j] = 0

dxdy = [(1, 0), (-1, 0), (0, 1), (0, -1)]

ans = 0
while que:
    x, y = que.popleft()
    for dx, dy in dxdy:
        nx = x + dx
        ny = y + dy
        if 0 <= nx < w and 0 <= ny < h and s[ny][nx] == -1:
            que.append((nx, ny))
            s[ny][nx] = s[y][x] + 1
            ans = max(ans, s[ny][nx])

print(ans)


### FIXED CODE ###

from collections import deque

h, w = map(int, input().split())
a = [list(input()) for _ in range(h)]

d = [[-1] * w for _ in range(h)]
que = deque()
for i in range(h):
    for j in range(w):
        if a[i][j] == '#':
            que.append((j, i))
            d[i][j] = 0

dxdy = [(1, 0), (-1, 0), (0, 1), (0, -1)]

ans = 0
while que:
    x, y = que.popleft()
    for dx, dy in dxdy:
        nx = x + dx
        ny = y + dy
        if 0 <= nx < w and 0 <= ny < h and d[ny][nx] == -1:
            que.append((nx, ny))
            d[ny][nx] = d[y][x] + 1
            ans = max(ans, d[ny][nx])

print(ans)
letter = input()
if(letter == "a" or letter == "e" or letter = "i" or letter == "o" or letter == "u"):
  print("vowel")
else:
  print("consonant")

### FIXED CODE ###

letter = input()
if letter in "aeiou":
  print("vowel")
else:
  print("consonant")
N = input()
M = input()

if N == M:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

N, M = input().split()

if N == M:
  print('Yes')
else:
  print('No')
h,w = map(int,input().split())
s = [0]*(h+2)
s[0] = ["."]*(w+2)
s[-1] = ["."]*(w+2)
for i in range(1,w+1):
    s[i] = ["."] + list(input()) + ["."]
ans = 1
for i in range(1,h+1):
    for j in range(1,w+1):
        if s[i][j] == "#":
            if s[i-1][j] == "." and s[i+1][j] == "." and s[i][j-1] == "." and s[i][j+1] == ".":
                ans = 0
                break
print(["No","Yes"][ans])

### FIXED CODE ###

h,w = map(int,input().split())
s = [0]*(h+2)
s[0] = ["."]*(w+2)
s[-1] = ["."]*(w+2)
for i in range(1,h+1):
    s[i] = ["."] + list(input()) + ["."]
ans = 1
for i in range(1,h+1):
    for j in range(1,w+1):
        if s[i][j] == "#":
            if s[i-1][j] == "." and s[i+1][j] == "." and s[i][j-1] == "." and s[i][j+1] == ".":
                ans = 0
                break
print(["No","Yes"][ans])
import math
a, b = map(int, input().split())

print(int(a * b / math.gcd(a,b)))

### FIXED CODE ###

a, b = map(int, input().split())
if a < b:
    a, b = b, a

c = a
d = b
r = c // d
m = c % d

while True:
    if m == 0:
        break
    else:
        c = d
        d = m
        m = c % d

print(int(a * b / d))
N = int(input())
for _ in range(N):
  number += [ int(input()) ]
for i in range(3):
  for t in range(3):
    if array[i][t] in number:
      array[i][t] = 0
for i in range(1):
  if array[i][0] == array[i+1][0] == array[i+2][0]:
    print('Yes')
    exit()
  elif array[i][1] == array[i+1][1] == array[i+2][1]:
    print('Yes')
    exit()
  elif array[i][2] == array[i+1][2] == array[i+2][2]:
    print('Yes')
    exit()
  elif array[i][0] == array[i][1] == array[i][2]: 
    print('Yes')
    exit()
  elif array[i+1][0] == array[i+1][1] == array[i+1][2]:
    print('Yes')
    exit()
  elif array[i+2][0] == array[i+2][1] == array[i+2][2]:
    print('Yes')
    exit()
    
if array[0][0] == array[1][1] == array[2][2] or array[0][2] == array[1][1] == array[2][0]:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

array = [ list(map(int,input().split())) for _ in range(3) ]
number = []
N = int(input())
for _ in range(N):
  number += [ int(input()) ]
for i in range(3):
  for t in range(3):
    if array[i][t] in number:
      array[i][t] = 0
for i in range(1):
  if array[i][0] == array[i+1][0] == array[i+2][0]:
    print('Yes')
    exit()
  elif array[i][1] == array[i+1][1] == array[i+2][1]:
    print('Yes')
    exit()
  elif array[i][2] == array[i+1][2] == array[i+2][2]:
    print('Yes')
    exit()
  elif array[i][0] == array[i][1] == array[i][2]: 
    print('Yes')
    exit()
  elif array[i+1][0] == array[i+1][1] == array[i+1][2]:
    print('Yes')
    exit()
  elif array[i+2][0] == array[i+2][1] == array[i+2][2]:
    print('Yes')
    exit()
    
if array[0][0] == array[1][1] == array[2][2] or array[0][2] == array[1][1] == array[2][0]:
  print('Yes')
else:
  print('No')
import math
A, B = map(int, input().split())
print(int(A*B/math.gcd(A, B)))

### FIXED CODE ###

from fractions import gcd
A, B = map(int, input().split())
print(int(A*B/gcd(A, B)))
import bisect
A, B, Q = map(int, input().split())
INF = 10 ** 18
s = [-INF] + [int(input()) for i in range(A)] + [INF]
t = [-INF] + [int(input()) for i in range(B)] + [INF]
for q in range(Q):
  x = int(input())
  b, d = bisect.bisect_right(s, x), bisect.bisect_right(t, x)
  res = INF
  for S in [s[b - 1], s[b]]:
    for T in [t[d - 1], t[d]]:
      d1, d2 = abs(S - x) + abs(T - S), abs(T - x) + abs(S - T)
  	  res = min(res, d1, d2)
  	  print(res)

### FIXED CODE ###

y, m, d = [int(s) for s in input().split('/')]

if y > 2019:
  print('TBD')
elif y < 2019:
  print('Heisei')
else: # y == 2019
  if m < 5:
    print('Heisei')
  else:
    print('TBD')
s = int(input().replace(' ',''))
print("Yes" if int(s**0.5)**2==s) else "No")

### FIXED CODE ###

s = int(input().replace(' ',''))
print("Yes" if int(s**0.5)**2==s else "No")
from sys import stdin
readline = stdin.readline

import operator


def norm(self):
    return abs(self)

def closest_pair(p):
    m = 0
    p.sort(key=operator.attrgetter('real'))
    d = float('inf')
    for i in range(1, len(p)):
        for j in reversed(range(m, i)):
            tmp = abs(p[j] - p[i])
            if d < tmp.real:
                m += 1
                break
            elif d > tmp:
                d = tmp
    return d



from itertools import combinations
def brute_force(p):
    return min(abs(p[i] - p[j]) for i, j in combinations(range(len(p)), 2))

@profile
def main():
    n = int(readline())
    p = [map(float, readline().split()) for _ in range(n)]
    p = [x + y * 1j for x, y in p]

    
    #print('{:.6f}'.format(brute_force(p)))
    print('{:.6f}'.format(closest_pair(p)))
main()

### FIXED CODE ###

from sys import stdin
from operator import attrgetter
readline = stdin.readline


def norm(a):
    return a.real * a.real + a.imag * a.imag


def closest_pair(p):
    if len(p) <= 1:
        return float('inf')
    m = len(p) // 2
    d = min(closest_pair(p[:m]), closest_pair(p[m:]))
    p = [pi for pi in p if p[m].imag - d < pi.imag < p[m].imag + d]
    return brute_force(p, d)

def brute_force(p, d=float('inf')):
    p.sort(key=attrgetter('real'))
    for i in range(1, len(p)):
        for j in reversed(range(i)):
            tmp = p[i] - p[j]
            if d < tmp.real:
                break
            tmp = abs(tmp)
            if d > tmp:
                d = tmp
    return d


def main():
    n = int(readline())
    p = [map(float, readline().split()) for _ in range(n)]
    p = [x + y * 1j for x, y in p]

    p.sort(key=attrgetter('imag'))
    print('{:.6f}'.format(closest_pair(p)))
main()
import math
N, *A = map(int,inp.split())

for e in A:
    d = dict((i, A.count(i)) for i in set(A))
    d[e]-=1
    
    ans = 0
    for i in list(d):
        if d[i] < 2:
            continue
        ans += d[i]*(d[i]-1)/2
    print(int(ans))
    

### FIXED CODE ###

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

ad = {}
for i in range(n) :
    if a[i] in ad :
        ad[a[i]] += 1
    else :
        ad[a[i]] = 1

ans = 0
for v in ad.values():
    ans += v*(v-1)//2

for i in range(n):
    v = ad[a[i]]
    print(ans-v*(v-1)//2+(v-1)*(v-2)//2)
total = 0
c = []
for i in range(5):
    a = input()
    b = int(a)
    if int(a[-1]) != 0:
        c.append(int(a[-1]))
        total += b - int(a[-1]) + 10
    else:
        total += b

total += min(c)
total -= 10
print(total)

### FIXED CODE ###

total = 0
c = []
for i in range(5):
    a = input()
    b = int(a)
    if int(a[-1]) != 0:
        c.append(int(a[-1]))
        total += b - int(a[-1]) + 10
    else:
        total += b

if c:
    total += min(c)
    total -= 10
print(total)
A,B,C = map(int,input().split())
if A*C =<B:
  print("C")
else:
  print(B % A)

### FIXED CODE ###

A,B,C = map(int,input().split())
if (A * C) <=B:
  print(C)
else:
  print(B // A)
import sys

btns = sys.stdin.readline().split()
Coins=0

for i in range(2):
    if X > Y:
        Coins+=X
        X -= 1
    else:
        Coins+=Y
        Y-=1

print(Coins)



### FIXED CODE ###

btns=input().split()
X=int(btns[0])
Y=int(btns[1])
Coins=0

for i in range(2):
    if X > Y:
        Coins+=X
        X -= 1
    else:
        Coins+=Y
        Y-=1

print(Coins)
# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_8_C

?????????????????????

?????????????????±??????????????????????????¢???????????????????????°?????°??????????????°????????????????????????????????? ??????????°?????????¨??§??????????????\???????????????
"""

if __name__ == '__main__':
    sentence_end = False  # ????????\??????????????????????????????
    letter_counts = [0] * 26  # ?????¢????????????????????????????????° [0]???'a'???[25]???'z'??????????????°
    while sentence_end is False:
        # ??±?????????????????\???
        raw_input = input()
        if '.' in raw_input or raw_input == '':
            sentence_end = True

        # ?°?????????¨??§??????????????\????????????
        lower_text = raw_input.lower()

        # ??¢???????????????????????¨??????????????°???????¨?
        for c in lower_text:
            if 'a' <= c <= 'z':
                letter_counts[ord(c)-ord('a')] += 1

    # ????????? 'a : a????????°' ?????¢??§z?????§1????????¨?????????
    for i, n in enumerate(letter_counts):
        print('{0} : {1}'.format(chr(ord('a')+i), n))

### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=ITP1_8_C&lang=jp

"""
import sys
from sys import stdin
from collections import defaultdict
input = stdin.readline


def main(args):
    word = defaultdict(int)
    for line in sys.stdin:
        line = line.strip()
        for c in line:
            if c.isalpha():
                c = c.lower()
                word[c] += 1

    for c in 'abcdefghijklmnopqrstuvwxyz':
        print('{} : {}'.format(c, word[c]))


if __name__ == '__main__':
    main(sys.argv[1:])
N, Q = [int(i) for i in input().split()]
G = [[] for _ in range(N)]
counter = [0] * N
res = [0] * N
visited = [0] * N

for _ in range(N-1):
    a, b = [int(i)-1 for i in input().split()]
    G[a].append(b)
    G[b].append(a)

for _ in range(Q):
    p, x = [int(i) for i in input().split()]
    p -= 1
    counter[p] += x

def dfs(G, v, p):
    visited[v] = 1
    res[v] = res[p]+counter[v]
    for nv in G[v]:
        if visited[nv]: continue
        dfs(G, nv, v)

dfs(G, 0, 0)
print(*res)

### FIXED CODE ###

N, Q = [int(i) for i in input().split()]
G = [[] for _ in range(N)]
counter = [0] * N
res = [0] * N
visited = [0] * N

for _ in range(N-1):
    a, b = [int(i)-1 for i in input().split()]
    G[a].append(b)
    G[b].append(a)

for _ in range(Q):
    p, x = [int(i) for i in input().split()]
    p -= 1
    counter[p] += x

# def dfs(G, v, p):
#     visited[v] = 1
#     res[v] = res[p]+counter[v]
#     for nv in G[v]:
#         if visited[nv]: continue
#         dfs(G, nv, v)

stack = [0]
parent = [0]
while stack:
    v = stack.pop()
    p = parent.pop()
    visited[v] = 1
    res[v] = res[p]+counter[v]
    for nv in G[v]:
        if visited[nv]: continue
        stack.append(nv)
        parent.append(v)

# dfs(G, 0, 0)
print(*res)
n, q = map(int, input().split())
tree = [[] for _ in range(n+1)]
for _ in range(n-1):
    a, b = map(int, input().split())
    tree[a].append(b)
adds = [0]*(n+1)
for _ in range(q):
    p, x = map(int, input().split())
    adds[p] += x

res = [0]*(n+1)
def add_x(p, x):
    res[p] += x
    for child in tree[p]:
        new_x = x+adds[child]
        add_x(child, new_x)

add_x(1, adds[1])

print(*res[1:])

### FIXED CODE ###

import sys
from heapq import *
sys.setrecursionlimit(10**8)

input = sys.stdin.readline

tree = [[] for _ in range(200001)]
res = [0]*200001

def dfs(p, pre):
    for child in tree[p]:
        if child == pre: continue
        res[child] += res[p]
        dfs(child, p)

def main():
    """ main """
    N, Q = map(int, input().split())
    for _ in range(N-1):
        a,b = map(int, input().split())
        tree[a].append(b)
        tree[b].append(a)
    for _ in range(Q):
        p,x = map(int, input().split())
        res[p] += x
    dfs(1, 0)

    print(*res[1:N+1])

if __name__ == '__main__':
    main()
import math as mt
N,K = [int(i) for i in input().rstrip().split()]
R = 0
for n in range(1,N+1):
    l = mt.floor(mt.log2((K-1)/n))+1
    if l <= 0:
        R += 1/N*(N-n+1)
        #print(K,n,l,R)
        print(R)
        break
    else:
        R += 1/N*0.5**l
        #print(K,n,l,R)

### FIXED CODE ###

import math as mt
N,K = [int(i) for i in input().rstrip().split()]
R = 0
for n in range(1,N+1):
    l = mt.floor(mt.log2(K/n) - 0.1**9)+1
    if l <= 0:
        R += 1/N*(N-n+1)
        #print(K,n,l,R)
        break
    else:
        R += 1/N*0.5**l
        #print(K,n,l,R)
print(R)
N = int(input())
A = [int(x) for x in input().split()]
S = sum(A)
L = A[0]
m = S-L
k = 1
for i in range(1, N-1):
  L += A[i]
  if S-L < m:
    k = i+1
print(abs(S-2*sum(A[:k]))



### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
allL = sum(A)
L, mL = 0, float('inf')
for i in range(N):
    L += A[i]
    if abs(2*L-allL) < mL:
        mL = abs(2*L-allL)
    else:
        break
print(mL)
N=int(input())
T_N=int(input().split())
list_time=[]
for i in range(N):
    list_time.append(T_N[i])
#Ti秒の総和を求める
sum=sum(list_time)
M=int(input())
for i in range(M):
    p,x=map(int,input.split())
    #ドリンク飲んだ時と飲まないときの差を元の合計に足す。
    ans=sum+x-list_time[p-1]
print(ans)

### FIXED CODE ###

A,op,B=input().split()
a=int(A)
b=int(B)
 
if op == "+" :
    print(a+b)
  
elif op == "-" :
    print(a-b)
n=int(input())
t=list(map(int,input().split()))
m=int(input())
p,x=[],[]
for _ in range(m):
  _p,_x=map(int,input().split())
  p.append(_p)
  x.append(_x)
s=sum(t)
ans=s
for i in range(m):
  ans=min(ans,s-t[p[i]]+x[p[i]])
print(ans)

### FIXED CODE ###

n=int(input())
t=list(map(int,input().split()))
m=int(input())
p,x=[],[]
for _ in range(m):
  _p,_x=map(int,input().split())
  p.append(_p-1)
  x.append(_x)
s=sum(t)
for i in range(m):
  print(s-t[p[i]]+x[i])
n = int,input()
k = int(n/15)
x = 800*n - 200*k
print(x)

### FIXED CODE ###

n = int(input())
k = int(n/15)
x = 800*n
y = 200*k
print(x-y)
n = int(input())
x = int(input(),2)

ans = [0]*(str(bin(x)).count('1')+1)
for i in range(1,len(ans)):
    ans[i] = 1 + ans[i%str(bin(i)).count('1')]
#print(ans)
for i in range(n):
    y = x^(1<<(n-i-1))
    t = y % str(bin(y)).count('1')
    print(1+ans[t])

### FIXED CODE ###

n = int(input())
X = input()
x = int(X,2)
bitx = bin(x).count('1')
 
ans = [0]*(bitx+2)
for i in range(1,bitx+2):
    ans[i] = 1 + ans[i%bin(i).count('1')]
#print(ans)
l = []
bitp = bitx + 1
bitm = bitx - 1
xmp = 0
xmm = 0


if bitx != 1:
    for i in range(n):
        if X[i] == '1':
            xmp += pow(2, n-(i+1), bitp)
            xmm += pow(2, n-(i+1), bitm)
    for i in range(n):
        if X[i] == '1':
            xm = (xmm - pow(2,n-i-1,bitm)) % bitm
            l.append(str(1+ans[xm]))
        else:
            xm = (xmp + pow(2,n-i-1,bitp))%bitp
            l.append(str(1+ans[xm]))
 
else:
    for i in range(n):
        if X[i] == '1':
            xmp += pow(2, n-(i+1), bitp)
    for i in range(n):
        if X[i] == '1':
            l.append(str(0))
        else:
            xm = (xmp + pow(2,n-i-1,bitp))%bitp
            l.append(str(1+ans[xm]))
 
print('\n'.join(l))
n = int(input())
a = list(map(int, input().split()))
a.sort()

#強さを出力
def T(x,y,z):
    ma = max(x,y,z)
    mi = min(x,y,z)
    return (x+y+z) - (ma+mi)

b = a[0::2]
c = a[1::2]


ans = 0
for i in range(0,3*n//2,3):
    print(b[i:i+3],c[i:i+3])
    ans += T(*b[i:i+3]) + T(*c[i:i+3])
print(ans)

### FIXED CODE ###

n = int(input())
a = [int(x) for x in input().split()]
a.sort()
ans = sum(a[n::2])
print(ans)
n,a,b = (int(input()) for i in range(3))
ans = 0
count = 0
for i in range(n+1):
    j = i
    ans = 0
    while(i is not 0):
        ans = ans + i%10
        i = int(i/10)
    if ans >= a and ans <= b:
        count = count +j
print(count)

### FIXED CODE ###

n = list(map(int,input().split()))
ans = 0
count = 0
for i in range(n[0]+1):
    j = i
    ans = 0
    while(i is not 0):
        ans = ans + i%10
        i = int(i/10)
    if ans >= n[1] and ans <= n[2]:
        count = count +j
print(count)
inf = 2019
L, R = map(int, input().split())
ans = 2018
L = L % 2019
R = R % 2019
if L > R:
    print(0)
    sys.exit
for i in range(L, L + 2018):
    if i > R:
      break
      
    for j in range(i + 1, R):
        tmp = int((i * j) % inf)
        ans = min(ans, tmp)
        
print(ans)


### FIXED CODE ###

inf = 2019
L, R = map(int, input().split())
ans = 0
df = R - L
if df < 2019:
    L = L % inf
    R = L + df
    ans = 2019
    for i in range(L, R):
        for j in range(i + 1, R + 1):
            tmp = int((i * j) % inf)
            ans = min(ans, tmp)

print(ans)
s=input():str
s=s.split(" ")
A,B=s[0],s[1]
kuti=1
c=0
while kuti<B:
    kuti+=(A-1)
    c+=1

### FIXED CODE ###

hare="S"
kumori="C"
ame="R"
S=input()
T=input()
c=0
for i,s in enumerate(S):
    if s==T[i]:
        c+=1
print(c)
import math
n,d=map(int,input().split())
print(math.ceil(n/(2d+1)))

### FIXED CODE ###

import math
n,d=map(int,input().split())
print(math.ceil(n/(d*2+1)))
n,k = list(map(int, input().split()))
a = list(map(int, input().split()))
f = list(map(int, input().split()))
a.sort()
f.sort()

import numpy as np

a = np.array(a)
f = np.array(f)
f_ = f[::-1]

left = 0
right = np.max(a*f_)

while left + 1 < right:
    mid = (left + right)//2
    x = np.maximum(0, a - (mid//f_) ).sum() <= k
    if x:
        right = mid
    else:
        left = mid

print(right)

### FIXED CODE ###

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

import numpy as np

a = np.array(a)
f = np.array(f)
f_ = f[::-1]

left = -1
right = np.max(a*f_)

while left + 1 < right:
    mid = (left + right)//2
    x = np.maximum(0, a - (mid//f_) ).sum() <= k
    if x:
        right = mid
    else:
        left = mid

print(right)
S=int(input())
x=10**9+7
a=[0 for i in range(S+1)]
a[3]=1
a[4]=1
a[5]=1
a[6]=2
for i in range(7,S+1):
    a[i]=(a[i-1]+a[i-3])%x
print(a[S])

### FIXED CODE ###

S=int(input())
x=10**9+7
a=[0 for i in range(2001)]
a[3]=1
a[4]=1
a[5]=1
a[6]=2
for i in range(7,S+1):
    a[i]=(a[i-1]+a[i-3])%x
print(a[S])
a,b=map(int,open(0));print(str(min(a,b))*max(a,b))


### FIXED CODE ###

a,b=map(int,input().split());print(str(min(a,b))*max(a,b))
N = int(input())
A = list(map(int, input().split()))
A.sort(reverse=True)
count = 1
for i in range(N-1):
  flag = 1
  for j in range(N-1, i, -1):
    if A[i] % A[j] == 0:
      flag = 0
      break
  if flag:
      count += 1
if N == 1:
  print(0)
elif A[0] == A[1]:
  print(0)
else:
  print(count)

### FIXED CODE ###

X = list(map(int, input().split()))
for i in range(len(X)):
  if X[i] == 0:
    print(i+1)
    break
S_a, S_b, S_c = [input() for _ in range(3)]
trun = 'a'
relation = {'a': S_a, 'b': S_b, 'c': S_c}
while True:
  card = relaton[turn].pop(0)
  turn = card
  
  if len(S_a) == 0:
    print('A')
    exit()
  if len(S_b) == 0:
    print('B')
    exit()
  if len(S_c) == 0:
    print('C')
    exit()

### FIXED CODE ###

S_a, S_b, S_c = map(list, [input() for _ in range(3)])
turn = 'a'
relation = {'a': S_a, 'b': S_b, 'c': S_c}
while True: 
  if turn == 'a' and len(S_a) == 0:
    print('A')
    exit()
  if turn == 'b' and len(S_b) == 0:
    print('B')
    exit()
  if turn == 'c' and len(S_c) == 0:
    print('C')
    exit()
  
  card = relation[turn].pop(0)
  turn = card
import sys
A,B = map(int,input())
if not ( 1 <= A <= 100 and 1 <= B <= 100 ): sys.exit()

print(A*B)

### FIXED CODE ###

import sys
A,B = map(int,input().split())
if not ( 1 <= A <= 100 and 1 <= B <= 100 ): sys.exit()

print(A*B)
#a,b=map(int,input().split())
#lis=list(map(int,input().split()))
#n=int(input())
#s=input()
def yana(int(input())>=30):
  if boo:
    print("Yes")
  else:
    print("No")

### FIXED CODE ###

def yana(boo):
  if boo:
    print("Yes")
  else:
    print("No")
yana(int(input())>=30)
import copy

mas_num = int(input())
h = list(map(int, input().split()))
c = copy.copy(h)
d = copy.copy(h)
c.pop(0)
d.pop(0)
d.pop(0)

for i,j,k in zip(h, c, d):
    if i - 1 > j:
        print('No')
        break
    else:
        if i - 2 > k:
            print('No')
            break
        else:
            if h[-2] - 1 > h[-1]:
                print('No')
                break
            else:
                print('Yes')
                break

### FIXED CODE ###

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

ans = "Yes"

if n != 1:
  for i in range(n-1):
    if h[i]-1>h[i+1]:
      ans = "No"
      break
    elif h[i]-1==h[i+1]:
      h[i+1] += 1
      
print(ans)