Harryxun/stf_run huggingface dataset:
print('YES' if len(s = input()) - s.count('o') <= 7 else 'NO')


### FIXED CODE ###


s = input()
a = 0

for i in s:
    a += 1 if i == 'o' else 0

if a + 15 - len(s) >= 8:
    print('YES')
else:
    print('NO')
from math import ceil
x = (a + b) / 2
print(ceil(x))

### FIXED CODE ###

import math
a,b = map(int, input().split())
x = (a + b) / 2
print(math.ceil(x))
s = input()
sr = s.replace(s[0], '')
srr = sr.replace(sr[0], '')
if len(sr) == 2 and len(srr) == 0:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

s = input()
sr = s.replace(s[0], '')
if len(sr) == 2 and sr.count(sr[0]) == 2:
    print('Yes')
else:
    print('No')
from enum import Enum
from queue import Queue
import collections

import sys
import math
import time

#t1=time.time()
#input = sys.stdin.readline
BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001


S = input().strip()
# S = str('?'*(10**5))
N = 13

dp =[0]*N
dp[0]=1

mul = 1
reversed_S = S[::-1]
for c in reversed_S:
    nextDP = [0]*N
    if c == '?':
        # print('test')
        # print(mul)
        for k in range(10):
            for j in range(N):
                nextDP[(mul*k+j)%N] += dp[j]
                nextDP[(mul*k+j)%N] %= MOD
    else:
        k = int(c)
        for j in range(N):
            nextDP[(mul*k+j)%N] += dp[j]
            nextDP[(mul*k+j)%N] %= MOD

    mul *= 10
    mul %= N
    dp = nextDP[:]
print(dp[5])
#print(time.time()-t1)


### FIXED CODE ###

#from enum import Enum
#from queue import Queue
#import collections

#import sys
#import math
#import time

#t1=time.time()
#input = sys.stdin.readline
BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001


S = input().strip()
# S = str('?'*(10**5))
N = 13

dp =[0]*N
dp[0]=1

mul = 1
reversed_S = S[::-1]
for c in reversed_S:
    nextDP = [0]*N
    if c == '?':
        # print('test')
        # print(mul)
        for k in range(10):
            for j in range(N):
                nextDP[(mul*k+j)%N] += dp[j]
                nextDP[(mul*k+j)%N] %= MOD
    else:
        k = int(c)
        for j in range(N):
            nextDP[(mul*k+j)%N] += dp[j]
            nextDP[(mul*k+j)%N] %= MOD

    mul *= 10
    mul %= N
    dp = nextDP[:]
print(dp[5])
#print(time.time()-t1)
r, c = map(int, input().split())

cc = [input() for i in range(r)]

from collections import deque
import numpy as np

# 縦がｙ 横がx　だから座標はy,xて書く
st=[]
for i in range(r):
    for j in range(c):
        if cc[i][j]=="#":
            st.append([i,j])

# 保留スタックtodoにスタートの位置情報を入れる
todo=deque(st)
# 検知済みリストseenを-1で初期化 (何も検知してないてこと)
se=np.array([-1]*(r*c))
seen=se.reshape(r,c)

# seenにはどんだけの手数でそこに到達できるかを入れる
# 例えばスタート地点は手数0でいけるから0を入れる
for i in range(len(st)):
    seen[st[i][0],st[i][1]]=0

# 4方向の移動リスト これ使って移動していく
ido=[[1,0],[0,1],[-1,0],[0,-1]]

# 保留リストtodoが空になるまでやる
while todo:
    y, x=todo.popleft() # 現在地は保留からの先頭とりだす
    for i in range(4): # 現在地から4方向を見る
        ny, nx=y+ido[i][0], x+ido[i][1] # 現在地から隣の座標
        # 隣の座標が区画をはみ出さないかつ、検知してないときに
        if 0<=ny<r and 0<=nx<c and seen[ny, nx]==-1 and cc[ny][nx]!="#":
            # 隣に行けるということなので検知してその手数を格納
            seen[ny, nx]=seen[y,x]+1 # 手数＝前の地点の手数+1
            todo.append([ny,nx]) # 保留リストにも入れとく

print(seen.max())



### FIXED CODE ###

r, c = map(int, input().split())

cc = [input() for i in range(r)]

from collections import deque


# 縦がｙ 横がx　だから座標はy,xて書く
st=[]
for i in range(r):
    for j in range(c):
        if cc[i][j]=="#":
            st.append([i,j])

# 保留スタックtodoにスタートの位置情報を入れる
todo=deque(st)
# 検知済みリストseenを-1で初期化 (何も検知してないてこと)
seen=[[-1 for i in range(c)] for j in range(r)]

# seenにはどんだけの手数でそこに到達できるかを入れる
# 例えばスタート地点は手数0でいけるから0を入れる
for i in range(len(st)):
    seen[st[i][0]][st[i][1]]=0

# 4方向の移動リスト これ使って移動していく
ido=[[1,0],[0,1],[-1,0],[0,-1]]
m=0
# 保留リストtodoが空になるまでやる
while todo:
    y, x=todo.popleft() # 現在地は保留からの先頭とりだす
    for i in range(4): # 現在地から4方向を見る
        ny, nx=y+ido[i][0], x+ido[i][1] # 現在地から隣の座標
        # 隣の座標が区画をはみ出さないかつ、検知してないときに
        if 0<=ny<r and 0<=nx<c and seen[ny][nx]==-1 and cc[ny][nx]!="#":
            # 隣に行けるということなので検知してその手数を格納
            seen[ny][nx]=seen[y][x]+1 # 手数＝前の地点の手数+1
            todo.append([ny,nx]) # 保留リストにも入れとく
            if seen[ny][nx]>=m:
                m=seen[ny][nx]
       

print(m)
import sys
n,k=map(int, input().split()) #a1 a2 a3

com = [list(map(int, input().split())) for _ in range(n)]

i=0

while k>0:
  k-=com[i][1]
  i+=1

print(com[~i][0]) #~i -i-1


### FIXED CODE ###

n,k=map(int,input().split());i=0;a=sorted(list(map(int,input().split()))for _ in[0]*n)
while k>0:k-=a[i][1];i+=1
print(a[~-i][0])
s = list(input())
k = int(input())

if k == '1':
    print(s[0])
else:
    if s[0] == '1':
        print(s[1])
    else:
        print(s[0])

### FIXED CODE ###

s = list(input())
k = input()

if k == '1':
    print(s[0])
else:
    n = min(int(k), len(s))
    f = True
    for i in range(n):
        if s[i] != '1':
            print(s[i])
            f = False
            break
    if f:
        print(1)
def main():
    A = int(input())
    B = int(input())
    ans = a(A, B)
    print(ans)

def a(A, B):
    return (A * B)

main()

### FIXED CODE ###

A, B = map(int, input().split())
print(A*B)
n=int(input())
l=[26**i for i in range(1,10)]
ans=[]
for i in range(len(l)):
  if n-l[i]<=0:
    if n==l[i]:
      print('z'*(i+1))
      break
    else:
      for j in range(1,i+2):
        div,mod=divmod(n,26**(i+1-j))
        if div==0:
          ans.append(chr(ord('a')+mod-1))
        else:
          ans.append(chr(ord('a')+div-1))
          n=mod
      else:
        print(''.join(ans))
        exit()
  else:
    n-=l[i]


### FIXED CODE ###

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(read())

def main(N):
  A = [1]
  for _ in range(100):
    A.append(A[-1] * 26)
  for n in range(1, 100):
    if N > A[n]:
      N -= A[n]
      continue

    N -= 1
    ret = []
    
    for _ in range(n):
      N, r = divmod(N, 26)
      ret.append(r)
    break
  ret = [chr(ord('a') + x) for x in ret]
  return ''.join(reversed(ret))
 
print(main(N))
if not x == 0:
  for i in range(10000):
    for j in range(-10000,10000):
      if i**5 - j**5 == x:
        a = i
        b = j
    
print(str(a)+" "+str(b))

### FIXED CODE ###

x = int(input())
a = 0
b = 0
if not x == 0:
  for i in range(1000):
    for j in range(-100,1000):
      if i**5 - j**5 == x:
        a = i
        b = j
      if a != 0 or b != 0:
        break
    if a != 0 or b != 0:
        break
    
print(str(a)+" "+str(b))
n = int(input())
a = map(int, input().split(" "))

color_types = [False]*8
pro_count = 0
for a_i in a:
	if a_i < 3200:
		color_types[a_i//400] = True
	else:
		pro_count += 1
print(max(1,　sum(color_types)), min(8, sum(color_types)+pro_count))

### FIXED CODE ###

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

color_types = [False]*8
pro_count = 0
for a_i in a:
	if a_i < 3200:
		color_types[a_i//400] = 1
	else:
		pro_count += 1
print(max(1, sum(color_types)), sum(color_types)+pro_count)
a,b,k =map(int,input().split())

def euclid(p,q):
  if q == 0:
    return p
  else:
    return euclid(q,p//q)
  
n = euclid(a,b)
count = 0
for i in range(n):
  if n % (n-i)==0:
    count += 1
  if count == k:
    print(n-i)
    break


### FIXED CODE ###

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

def euclid(p,q):
  if q == 0:
    return p
  else:
    return euclid(q,p%q)
  
n = euclid(a,b)
count = 0
for i in range(n):
  if n % (n-i)==0:
    count += 1
  if count == k:
    print(n-i)
    break
S = input()
mydict = {"A":"T","T":"A","G":"C","c":"G"}
print(mydict[S])

### FIXED CODE ###

S = input()
mydict = {"A":"T","T":"A","G":"C","C":"G"}
print(mydict[S])
S = input()
T = input()

Slr = list(S[::-1])
Tlr = list(T[::-1])

for i in range(len(S)-len(T)+1):
    flag = True
    for j in range(len(T)):
        if Slr[i+j]==Tlr[j] or Slr[i+j]=="?":
            pass
        else:
            flag = False
            break
    if flag:
        for j in range(len(T)):
            Slr[i+j] = Tlr[j]
        for j in range(len(S)):
            if Slr[i+j]=="?":
                Slr[i+j] = "a"
        ans = ("".join(Slr[::-1]))
        break
    else:
        if i==len(S)-len(T):
            ans = "UNRESTORABLE"
print(ans)





### FIXED CODE ###


S = input()
T = input()

if len(T)>len(S):
    ans = "UNRESTORABLE"
else:
    Slr = list(S[::-1])
    Tlr = list(T[::-1])
    for i in range(len(S)-len(T)+1):
        flag = True
        for j in range(len(T)):
            if Slr[i+j]==Tlr[j] or Slr[i+j]=="?":
                pass
            else:
                flag = False
                break
        if flag:
            for j in range(len(T)):
                Slr[i+j] = Tlr[j]
            for j in range(len(S)):
                if Slr[j]=="?":
                    Slr[j] = "a"
            ans = ("".join(Slr[::-1]))
            break
        else:
            if i==len(S)-len(T):
                ans = "UNRESTORABLE"
print(ans)
A = input()
B = input()
C = input()

ABC = {"a":deque(A), "b":deque(B), "c":deque(C)}
ABC_H = {"a":"A", "b":"B", "c":"C"}

ind = A[0]
while True:

    if len(ABC[ind]) == 0:
        break 
    ind = ABC[ind].popleft()

print(ABC_H[ind])


### FIXED CODE ###

#! /usr/bin/env python3

from fractions import gcd
# from math import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement

A = input()
B = input()
C = input()

ABC = {"a":deque(A), "b":deque(B), "c":deque(C)}
ABC_H = {"a":"A", "b":"B", "c":"C"}

ind = A[0]
while True:

    if len(ABC[ind]) == 0:
        break 
    ind = ABC[ind].popleft()

print(ABC_H[ind])
def( a , b )

ans1 = a * b
ans2 = 2 * ( a + b )

print ans1 ' ' ans2

### FIXED CODE ###

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

ans1 = a * b
ans2 = 2 * ( a + b )

print ans1 , ans2
#!/usr/bin python3
# -*- coding: utf-8 -*-

def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))
    dm = [0]*N
    dm[:] = A[:]

    for i in range(K):
        dm_ = [0]*N
        for x in range(N):
            dm_[max(x - dm[x],0)]+=1
            if x+dm[i]+1<N:
                dm_[x + dm[x] + 1]+=-1
        dm[:] = dm_[:]

#            print(dm)
        for j in range(1,N):
            dm[j]=dm[j-1]+dm[j]
    print(*dm)

if __name__ == '__main__':
    main()

### FIXED CODE ###

#!/usr/bin python3
# -*- coding: utf-8 -*-

def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

    for i in range(min(K,50)):
        dm = [0]*N
        for x in range(N):
            dm[max(x - A[x],0)]+=1
            if x+A[x]+1<N:
                dm[x+A[x]+1]+=-1
        for j in range(1,N):
            dm[j]=dm[j-1]+dm[j]
        A[:] = dm[:]
    print(*A)

if __name__ == '__main__':
    main()
kazu = int(input())
word = input()
score = word.split()
scin = [0]*kazu
zero = 0
for i in range(kazu):
    scin[i] = int(score[i])
    if scin[i] == 0:
        zero = 1:

answer = 1
for j in range(kazu):
    answer *= scin[j]
    if answer > 10**18 and zero == 0:
        answer = -1

if zero == 1 and answer > 10**18:
    answer = -1

print(answer)

### FIXED CODE ###

kazu = int(input())
word = input()
score = word.split()

maxn = 10**18
zero = 0
answer = 1
scin = [0]*kazu

for i in range(kazu):
    scin[i] = int(score[i])
    if scin[i] == 0:
        zero = 1
if zero == 1:
    answer = 0
else:
    for j in range(kazu):
        answer *= scin[j]
        if answer > maxn:
            answer = -1
            break
print(answer)
import numpy as np
import math


N, K = list(map(int, input().split()))
tmp = list(map(int, input().split()))
lamps = np.array(tmp, dtype=np.int64)
# init = lamps
# for i in range(K):
#     act = np.zeros((N, N),dtype=np.int64)
#     for i in range(N):
#         # if init[i] == 0:
#         #     continue
#         # d = math.floor(init[i] + 0.5)
#         dmin = i - int(init[i])
#         dmax = i + int(init[i])
#         if dmin < 0:
#             dmin = 0
#         if dmax > N-1:
#             dmax = N-1
#         act[i][dmin:dmax+1] = 1
#         act[i][i] = 0
#     s = np.sum(act, axis=1)
#     init = s + np.ones(N, dtype=np.int64)
# result = init.astype("int64")
# ans = list(map(str,result.tolist()))
# print(" ".join(ans))
print("3 3 4 4 3")

### FIXED CODE ###

name = str(input())
nickname = name[:3]

print(nickname)
inf = int(input())
i = 0
table = []
buil = [[[0]+10 for i in range(3)]for i in range(4)]

while(i < inf):
    b,f,r,v = map(int,input().split())
    b -=1
    f -=1
    r -=1
    buil[b][f][r] += c
    if buil[b][f][r] > 9: buil[b][f][r] = 9
    elif buil[b][f][r] < 0: buil[b][f][r] = 0
    i += 1

for i in range(4):
        if i != 0: print("#"*20)
            for j in range(3):
                    for k in range(10):
                        print(" %d" %(buil[i][j][k]),end ="")
                    print()

    


### FIXED CODE ###

inf = int(input())
i = 0
table = []
buil = [[[0]*10 for i in range(3)]for i in range(4)]

while(i < inf):
    b,f,r,v = map(int,input().split())
    b -=1
    f -=1
    r -=1
    buil[b][f][r] += v
    if buil[b][f][r] > 9: buil[b][f][r] = 9
    elif buil[b][f][r] < 0: buil[b][f][r] = 0
    i += 1

for i in range(4):
        if i != 0: print("#"*20)
        for j in range(3):
                for k in range(10):
                    print(" %d" %(buil[i][j][k]),end ="")
                print()
N = int(raw_input())
t = 1

for i in xrange(1, N):

    if i*i > N:
        break

    elif i*i == N:
        t = i
        break

    if N % i == 0:
        t = i

print len(str(N/t))

### FIXED CODE ###

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

print (A + B) % 24
string = ""
flag = 0
while True:
  try:
    s = raw_input()
    if s == "END_OF_TEXT"
    if flag == 0:
      W = s
      flag = 1
    else:
      string += s[:-1]
  except:
    break
print string.count(W)

### FIXED CODE ###

W = raw_input().lower()
string = []
ans = 0

while True:
	tmp = raw_input()
	if tmp == "END_OF_TEXT":
		break
	else:
		string += tmp.split()

# lower()
for i in range(len(string)):
	string[i] = string[i].lower()

while W in string:
	string.remove(W)
	ans += 1

print ans
from heapq import heappush, heappop, merge
from collections import defaultdict
import sys
F = sys.stdin
def single_input(): return F.readline().strip("\n")
def line_input(): return F.readline().strip("\n").split()

def solve():
    N, Q = map(int, line_input())
    events = []
    for _ in range(N):
        s, t, x = map(int, line_input())
        events.append((s-x, 1, x))
        events.append((t-x, -1, x))
    for _ in range(Q):
        d = int(single_input)
        events.append((d, 2, d))
    events = sorted(events)

    constructions = []
    under_construction = defaultdict(bool)
    ans = ''
    for _, flag, coord in events:
        if flag == 1:
            heappush(constructions, coord)
            under_construction[coord] = True
        elif flag == -1:
            under_construction[coord] = False
        else:
            while constructions:
                x = heappop(constructions)
                if under_construction[x]: # x is the minimum coordinate under construction
                    heappush(constructions, x)
                    ans += str(x) + '\n'
                    break
            else: # no constructions
                ans += '-1\n'
    print(ans)
    
if __name__ == "__main__":
    solve()

### FIXED CODE ###

from heapq import heappush, heappop, merge
from collections import defaultdict
import sys
F = sys.stdin
def single_input(): return F.readline().strip("\n")
def line_input(): return F.readline().strip("\n").split()

def solve():
    N, Q = map(int, line_input())
    events = []
    for _ in range(N):
        s, t, x = map(int, line_input())
        events.append((s-x, 1, x))
        events.append((t-x, -1, x))
    for _ in range(Q):
        d = int(single_input())
        events.append((d, 2, d))
    events = sorted(events)

    constructions = []
    under_construction = defaultdict(bool)
    ans = ''
    for _, flag, coord in events:
        if flag == 1:
            heappush(constructions, coord)
            under_construction[coord] = True
        elif flag == -1:
            under_construction[coord] = False
        else:
            while constructions:
                x = heappop(constructions)
                if under_construction[x]: # x is the minimum coordinate under construction
                    heappush(constructions, x)
                    ans += str(x) + '\n'
                    break
            else: # no constructions
                ans += '-1\n'
    print(ans)
    
if __name__ == "__main__":
    solve()
import numpy as np
from heapq import *

H, W = map(int, input().split())
sy, sx = map(lambda x: int(x) - 1, input().split())
ty, tx = map(lambda x: int(x) - 1, input().split())
s, t = sy * H + sx, ty * H + tx
graph = [input() for _ in range(H)]

INF = 1 << 30
dist = np.full(H * W, INF, np.int64)
que = []

def push(v, d):
    if(dist[v] <= d):
        return
    dist[v] = d
    heappush(que, (d, v))

def move(ny, nx, d):
    if ny < 0 or ny >= H or nx < 0 or nx >= W:
        return
    if graph[ny][nx] == '.':
        push(ny * H + nx, d)

push(s, 0)

while que:
    d, v = heappop(que)
    if d > dist[v]:
        continue
    y, x = divmod(v, H)
    for dy in range(-2, 3):
        for dx in range(-2, 3):
            move(y + dy, x + dx, d + (abs(dy) + abs(dx) > 1))

if dist[t] == INF:
    print(-1)
else:
    print(dist[t])


### FIXED CODE ###

import heapq

H, W = map(int, input().split())
sy, sx = map(lambda x: int(x) - 1, input().split())
ty, tx = map(lambda x: int(x) - 1, input().split())
s, t = sy * W + sx, ty * W + tx
graph = [input() for _ in range(H)]

INF = 1 << 30
dist = [INF] * (H * W)
que = []

def push(v, d):
    if(dist[v] <= d):
        return
    dist[v] = d
    heapq.heappush(que, (d, v))

def move(ny, nx, d):
    if ny < 0 or ny >= H or nx < 0 or nx >= W:
        return
    if graph[ny][nx] == '.':
        push(ny * W + nx, d)

push(s, 0)

while que:
    d, v = heapq.heappop(que)
    if d > dist[v]:
        continue
    if v == t:
        break
    y, x = divmod(v, W)
    for dy in range(-2, 3):
        for dx in range(-2, 3):
            move(y + dy, x + dx, d + (abs(dy) + abs(dx) > 1))

if dist[t] == INF:
    print(-1)
else:
    print(dist[t])
A, B, H = map(int, input().split())

print((A+B)*H//2)


### FIXED CODE ###

A = int(input())
B = int(input())
H = int(input())

print((A+B)*H//2)
N,M = map(int,input().split())
f = []
for i in range(M):
    A,B = map(int,input().split())
    a = {A,B}
    for i in f:
        if i & a != set():
            a = i | a
            f.remove(i)
#            print(f,a,i)
    f.append(a)

#print(f)
print(len(max(f)))

### FIXED CODE ###

N,M = map(int,input().split())
f = [[] for i in range(N)]
for i in range(M):
    A,B = map(int,input().split())
    f[A-1].append(B-1)
    f[B-1].append(A-1)
from collections import deque
d = deque()
x = [-1]*N
for i in range(N):
    if x[i] == -1:
        x[i] = i
        d.append(f[i])
    while len(d) > 0:
        z = d.popleft()
        for j in z:
            if x[j] == -1:
                x[j] = i
                d.append(f[j])
import collections
ans = collections.Counter(x)
print(ans.most_common()[0][1])
ans = [0]*(N+1)

for i in range(1, int(N**0.5)+1):
    for j in range(1, int(N**0.5)+2):
       for k in range(1, int(N**0.5)+2):
            f = i*i + j*j + k*k +i*j + j*k + k*i
            if f <= N:
                ans[f] += 1
print(*ans[1:], sep='\n')


### FIXED CODE ###

N = int(input())

ans = [0]*(N+1)

for i in range(1, int(N**0.5)+1):
    for j in range(1, int(N**0.5)+2):
       for k in range(1, int(N**0.5)+2):
            f = i*i + j*j + k*k +i*j + j*k + k*i
            if f <= N:
                ans[f] += 1
print(*ans[1:], sep='\n')
a=int(input())
b=int(input())
c=int(input())
if a==1:
  print("Hello World")
else:
  print(b+c)

### FIXED CODE ###

a=int(input())
if a==1:
  print("Hello World")
if a==2:
  b=int(input())
  c=int(input())
  print(int(b+c))
n, k = map(int, input().split())

ans = n
all = [n]
if n == 1 or k == 1 or n == 2*k or k == 2*n:
  ans = 0
elif abs(n - k) < n or abs(n - k) < k:
  ans = abs(n - k)
else:
  all = []
  for i in range(2*n):
    n = abs(n - k)
    all.append(n)

  
print(min(ans, min(all)))

### FIXED CODE ###

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

rot = n//k
x = n

if k == 1 or n == k or n%k == 0:
  x = 0
elif rot >= 1:
  x = n - k*rot
  
t = x%k

print(min(t, abs(t-k)))
import numpy as np

N = int(input())
upper = tuple(map(int,input().split()))
lower = tuple(map(int,input().split()))
upper_sum = np.cumsum(upper)
lower_sum = np.cumsum(np.flip(lower, 0))

s = np.zeros((N,), dtype=np.int32)

for i in range(N):
    s[i] = lower_sum[-1-i] + upper_sum[i]
print(np.max(s))

### FIXED CODE ###

import numpy as np

N = int(input())
upper = tuple(map(int, input().split()))
lower = tuple(map(int, input().split()))
upper_sum = np.cumsum(upper)
lower_sum = np.cumsum(np.flipud(lower))

s = np.zeros((N,), dtype=np.int32)

for i in range(N):
    s[i] = lower_sum[-1 - i] + upper_sum[i]
print(np.max(s))
INF = 10 ** 10
n = int(input())
a = [INF] + list(map(int, input().split())) + [-INF]
l = []
for i in range(n):
    if len(l) % 2 == 0:
        if a[i] > a[i + 1] <= a[i + 2]:
            l.append(a[i + 1])
    else:
        if a[i] < a[i + 1] >= a[i + 2]:
            l.append(a[i + 1])
t = 1000
for i in range(0, len(l), 2):
    t = t // l[i] * l[i + 1] + t % l[i]
print(t)


### FIXED CODE ###

INF = 10 ** 10
n = int(input())
a = [INF] + list(map(int, input().split())) + [-INF]
l = []
for i in range(n):
    if len(l) % 2 == 0:
        if a[i + 1] < a[i + 2]:
            l.append(a[i + 1])
    else:
        if a[i + 1] > a[i + 2]:
            l.append(a[i + 1])
t = 1000
for i in range(1, len(l), 2):
    t = t // l[i - 1] * l[i] + t % l[i - 1]
print(t)
import math
N = int(input())
T = []

def lcm(x, y):
    gc = math.gcd(x, y)
    ans = (x * y)//gc
    return ans

for i in range(N):
    T.append(int(input()))

    
g = lcm(T[0],T[1])
if len(T) > 2:
    for i in range(3,N-1):
        g = lcm(g,T[i+1])
    print(g)
else:
    print(g)

### FIXED CODE ###

import math
N = int(input())
T = []

def lcm(x, y):
    gc = math.gcd(x, y)
    ans = (x * y)//gc
    return ans

for i in range(N):
    T.append(int(input()))

    

if len(T) > 2:
    g = lcm(T[0],T[1])
    for i in range(3,N-1):
        g = lcm(g,T[i+1])
    print(g)
elif len(T) == 2:
    g = lcm(T[0],T[1])
    print(g)
else:
    print(T[0])
string=[]
W = input()#単語入力
while True:
    T = input()#入力
    if T == '':#EOT入力のときループぬける
        break
    string.append(T)#list追加
count=0
for i in range(len(string)):
    string[i]=string[i].lower()
    string[i] = string[i].split(" ")
    for j in range(len(string[i])):
        if W == string[i][j]:
            count+=1
print(count)


### FIXED CODE ###

string=[]
W = input()#単語入力
while True:
    T = input()#入力
    if T == 'END_OF_TEXT':#EOT入力のときループぬける
        break
    string.append(T)#list追加
count=0
for i in range(len(string)):
    string[i]=string[i].lower()
    string[i] = string[i].split(" ")
    for j in range(len(string[i])):
        if W == string[i][j]:
            count+=1
print(count)