Harryxun/stf_run huggingface dataset:
n = int(inout())
A = list(map(int, input().strip().split()))
count = 0
for i in range(1,n-1):
  if A[i]!=max(A[i-1],A[i],A[i+1]) and A[i]!=min(A[i-1],A[i],A[i+1]):
    count += 1
  else:
    count += 0
print(count)
  

### FIXED CODE ###

n = int(input())
A = list(map(int, input().strip().split()))
count = 0
for i in range(1,n-1):
  if A[i]!=max(A[i-1],A[i],A[i+1]) and A[i]!=min(A[i-1],A[i],A[i+1]):
    count += 1
  else:
    count += 0
print(count)
import sys
#sys.setrecursionlimit(2000)

input = sys.stdin.readline
'''
allinputs = iter(input().splitlines())
input = lambda : next(allinputs)
#'''
N, M = map(int, input().split())
mod = 10 ** 9 + 7
a = [0] * M
memo = [-1] * (N + 1)

for i in range(M):
	a[i] = int(input())

def step(n):
	if memo[n] >= 0:
		return memo[n]
	elif n < 2:
		memo[n] = 1
		return 1
	else:
		memo[n] = (step(n - 1) + step(n - 2)) % mod
		return memo[n]
			
for i in a:
	memo[i] = 0
	
print(step(N))

### FIXED CODE ###

import sys
input = sys.stdin.readline
'''
allinputs = iter(input().splitlines())
input = lambda : next(allinputs)
#'''

N, M = map(int, input().split())
mod = 10 ** 9 + 7
a = [0] * M
dp = [0] * (N + 2)
dp[0] = 1
dp[1] = 1

for i in range(M):
	a[i] = int(input())
	
now = 0
next = 0

for i in a:
	next = i
	for j in range(now + 1, next + 1):
		if j == i:
			dp[i] = 0
		else:
			dp[j] = (dp[j - 1] + dp[j - 2]) % mod
	
	now = next

next = N
for j in range(now + 1, next + 1):
		dp[j] = (dp[j - 1] + dp[j - 2]) % mod
print(dp[N])
a,b=map(str,input().split())
s=str(input())

if s==aaa or s=bbb:
  print('No')
  
else:
  print('Yes')

### FIXED CODE ###

def yesno(S):
  if S=="AAA" or S=="BBB":
    return "No"
  else:
    return "Yes"
S=input()
print(yesno(S))
n = int(input())
l = list()
name_dict = {1:'a', 2:'b', 3:'c', 4:'d', 5:'e', 6:'f', 7:'g', 8:'h', 9:'i', 10:'j', 11:'k', 12:'l', 13:'m', 14:'n', 15:'o', 16:'p', 17:'q', 18:'r', 19:'s', 20:'t', 21:'u', 22:'v', 23:'w', 24:'x', 25:'y', 26:'z'}
name = ''

while n != 0:
	l.append(n%26)
	n = n//26

if l != []:
	for i in reversed(l):
		name += name_dict[i]

print(name)


### FIXED CODE ###

n = int(input())
l = list()
name_dict = {0:'a', 1:'b', 2:'c', 3:'d', 4:'e', 5:'f', 6:'g', 7:'h', 8:'i', 9:'j', 10:'k', 11:'l', 12:'m', 13:'n', 14:'o', 15:'p', 16:'q', 17:'r', 18:'s', 19:'t', 20:'u', 21:'v', 22:'w', 23:'x', 24:'y', 25:'z'}
name = ''

while n != 0:
	n -= 1
	l.append(n%26)
	n = n//26

if l != []:
	for i in reversed(l):
		name += name_dict[i]

print(name)
k=int(input())

from collections import deque
g=deque((1,2,3,4,5,6,7,8,9))

b=[[str(k) for k in range(10) if -2<=k-i<3] for i in range(10)]

for i in range(10,1000000):
  i1=list(str(i))
  e1=len(i1)
  for h in range(e1-1):
    if not i1[h+1] in b[int(i1[h])]:
      break
  else:g.append(i)


print(g[k-1])

### FIXED CODE ###

from collections import deque 
k=int(input())
dq=deque()
for i in range(1,10):
    dq.append(i)

cnt=1
while cnt<k:
    now=dq.popleft()
    if now%10>=1:
        dq.append(now*10+now%10-1)
    dq.append(now*10+now%10)
    if now%10<=8:
        dq.append(now*10+now%10+1)
    cnt+=1
print(dq.popleft())
from scipy import special
N, M = map(int, input().split())

Nmath = special.comb(N, 2)
Mmath = special.comb(M, 2)

print(int(Nmath+Mmath))

### FIXED CODE ###

import itertools
r = 2
N, M = map(int, input().split())
Nmath = len(list(itertools.combinations(range(N), r)))
Mmath = len(list(itertools.combinations(range(M), r)))

print(int(Nmath+Mmath))
X, N = map(int, input().split())

exist = [False] * 101
p = list(map(int, input().split()))

for i in range(N):
    exist[p[i]] = True

for i in range(200):
    if X - i <= 0:
        print(X-i)
        exit()

    if not exist[X-i]:
        print(X-i)
        exit()

    if not exist[X+i]:
        print(X+i)
        exit()

    if X + i > 100:
        print(X+i)
        exit()


### FIXED CODE ###

X, N = map(int, input().split())

exist = [False] * 101
p = list(map(int, input().split()))

for i in range(N):
    exist[p[i]] = True

for i in range(200):
    if X - i <= 0:
        print(X-i)
        exit()

    if not exist[X-i]:
        print(X-i)
        exit()

    if X + i > 100:
        print(X+i)
        exit()

    if not exist[X+i]:
        print(X+i)
        exit()
import sys
import math
dp = [math.inf] * 1000000
dp[0] = 0
def frog(n,l):
    for i in range(n):
        for j in range(i+1,i+3):
            if(j<n):
                dp[j]=min(dp[j],dp[i]+abs(l[i]-l[j]))
    return dp[n-1]
if __name__ == "__main__":
        n = int(sys.stdin.readline())
        l = list(map(int, input().split()))
        sys.stdout.write(str(frog(n,l))+"\n")

### FIXED CODE ###

import sys
n = int(input())
l = list(map(int, input().split()))
dp = [sys.maxsize] *n
dp[0] = 0
for i in range(n):
    for j in range(i+1,i+3):
        if(j<n):
            dp[j]=min(dp[j],dp[i]+abs(l[i]-l[j]))
print(dp[n-1])
k=int(input())
s=str(input())
if len(s)<=k:
  print(k)
  else:
    print(s.replace(s[K:len(s)],"..."))

### FIXED CODE ###

k=int(input())
s=str(input())

if len(s)<=k:
  print(s)
else:
    print(s[0:k]+"...")
h = int(input())
a = int(input())
if h % a == 0:
    print(h//a)
else:
    print(h//a + 1)

### FIXED CODE ###

h,a = map(int,input().split())
if h % a == 0:
    print(h//a)
else:
    print(h//a + 1)
a= input()
b = input().split()
s = 0
for i in range(0,len(b)):
    s+=int(b[i])
if s-max(b)>max(b):
    print("Yes")
else:
    print("No")

### FIXED CODE ###

a= input()
b = input().split()
b = [int(s) for s in b]
s = 0
for i in range(0,len(b)):
    s+=int(b[i])
if s-int(max(b))>int(max(b)):
    print("Yes")
else:
    print("No")
import numpy as np
n=[]
line=''
while line != [0,0]:
    line=list(map(int,input().split()))
    n.append(line)
n=np.array(n)
for i in range(len(n)):
    print('%d %d'%(n[i,0] if n[i,0]>=n[i,1] else n[i,1],n[i,0] if n[i,0]<=n[i,1] else n[i,1]))

### FIXED CODE ###

n=[]
line=''
while line != [0,0]:
    line=list(map(int,input().split()))
    n.append(line)
for i in range(len(n)-1):
    print('%d %d'%(n[i][0] if n[i][0]<=n[i][1] else n[i][1],n[i][0] if n[i][0]>=n[i][1] else n[i][1]))
N=int(input())
H=list(map(int,input().split(' ')))

def dp(k):
	if k==0:
		return 0
	elif k==1:
		return abs(H[1]-H[0])
	else:
		return min(dp(k-2)+abs(H[k]-H[k-2]), dp(k-1)+abs(H[k]-H[k-1]))
		
print(dp(N-1))

### FIXED CODE ###

N=int(input())
H=list(map(int,input().split(' ')))
dp=[]

for k in range(N):
	if k==0:
		dp.append(0)
	elif k==1:
		dp.append(abs(H[1]-H[0]))
	else:
		dp.append(min(dp[k-2]+abs(H[k]-H[k-2]), dp[k-1]+abs(H[k]-H[k-1])))
		
print(dp[N-1])
import math

n, k = map(int, input().split())
if n > k:
	for i in range(k):
		j = i+1
	
		c_blue = (math.factorial(n-k+1))//((math.factorial(j))*(math.factorial(n-k+1-j)))
		c_div = (math.factorial(k-1))//((math.factorial(j-1))*(math.factorial(k-1-j+1)))
		comb = c_blue * c_div
	
		print(comb % 1000000007)
		
else:
	print(1)
	for i in range(n-1):
		print(0)

### FIXED CODE ###

import math

n, k = map(int, input().split())
if n > k:
	if n+1 >= 2*k:
		for i in range(k):
			j = i+1
			c_blue = (math.factorial(n-k+1))//((math.factorial(j))*(math.factorial(n-k+1-j)))
			c_div = (math.factorial(k-1))//((math.factorial(j-1))*(math.factorial(k-1-j+1)))
			comb = c_blue * c_div
			print(comb % 1000000007)
			
	else :
		for i in range(n-k+1):
			j = i+1
			c_blue = (math.factorial(n-k+1))//((math.factorial(j))*(math.factorial(n-k+1-j)))
			c_div = (math.factorial(k-1))//((math.factorial(j-1))*(math.factorial(k-1-j+1)))
			comb = c_blue * c_div
			print(comb % 1000000007)
		for _ in range(2*k -n -1):
			print(0)
else:
	print(1)
	for i in range(n-1):
		print(0)
a=int(input())
b=int(input())
if a==b:
  print(1)
  exit()
abin=bin(a)[2:]
bbin=bin(b)[2:]
la=len(abin)
lb=len(bbin)
if la==lb:
  while abin[0]==bbin[0]:
    abin=abin[1:]
    bbin=bbin[1:]
  while abin[0]=="0":
    abin=abin[1:]
cbin=bbin[1:]
while cbin[0]=="0":
  cbin=cbin[1:]
c=2**(len(cbin))-1
a=int(abin,2)
b=int(bbin,2)
lb=len(bbin)
lbnd=2**(lb-1)+c
hbnd=2**(lb-1)+a
if lbnd>=hbnd:
  print(2**lb-a)
else:
  print(2**(lb-1)-a+lbnd-a+1)

### FIXED CODE ###

a=int(input())
b=int(input())
if a==b:
  print(1)
  exit()
abin=bin(a)[2:]
bbin=bin(b)[2:]
la=len(abin)
lb=len(bbin)
if la==lb:
  while abin[0]==bbin[0]:
    abin=abin[1:]
    bbin=bbin[1:]
  while len(abin)>1 and abin[0]=="0":
    abin=abin[1:]
cbin=bbin[1:]
while cbin and cbin[0]=="0":
  cbin=cbin[1:]
c=2**(len(cbin))-1
a=int(abin,2)
b=int(bbin,2)
lb=len(bbin)
lbnd=2**(lb-1)+c
hbnd=2**(lb-1)+a
if lbnd>=hbnd:
  print(2**lb-a)
else:
  print(2**(lb-1)-a+lbnd-a+1)
n = int(input())
a = list(map(int,input().split()))
cnt=0
flag=True
while(flag):
  for i in range(len(a)):
    if(a[i]%2==0):
      a[i]=a[i]//2
    else:
      flag=False
      break
  cnt+=1
print(cnt-1)


### FIXED CODE ###

s=input()
count=0
if(s[0]=='1'):
  count+=1
if(s[1]=='1'):
  count+=1
if(s[2]=='1'):
  count+=1
print(count)
import sys
input = sys.stdin.readline

def f(ab: list, parent: list, i: int = 0):
    if len(ab[i]) == 1 and i != 0:
        return
    for j in ab[i]:
        if j != parent[i]:
            parent[j] = i
            f(ab, parent, j)

def g(ab: list, parent: list, ans: list, i: int = 0):
    if len(ab[i]) == 1 and i != 0:
        return
    for j in ab[i]:
        if j != parent[i]:
            ans[j] += ans[i]
            g(ab, parent, ans, j)

def main():
    N, Q = map(int, input().split())
    ab = [[] for _ in range(N)]
    for _ in range(N-1):
        a, b = map(int, input().split())
        ab[a-1].append(b-1)
        ab[b-1].append(a-1)
    parent = [-1] * N
    f(ab, parent)
    ans = [0] * N
    for _ in range(Q):
        p, x = map(int, input().split())
        ans[p-1] += x
    g(ab, parent, ans)
    print(' '.join(list(map(str, ans))))
    

if __name__ == '__main__': main()

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)
input = sys.stdin.readline

def g(ab: list, ans: list, check: list, i: int = 0):
    if len(ab[i]) == 1 and i != 0:
        return
    check[i] = False
    for j in ab[i]:
        if check[j]:
            ans[j] += ans[i]
            g(ab, ans, check, j)

def main():
    N, Q = map(int, input().split())
    ab = [[] for _ in range(N)]
    for _ in range(N-1):
        a, b = map(int, input().split())
        ab[a-1].append(b-1)
        ab[b-1].append(a-1)
    ans = [0] * N
    check = [True] * N
    for _ in range(Q):
        p, x = map(int, input().split())
        ans[p-1] += x
    g(ab, ans, check)
    print(' '.join(list(map(str, ans))))
    

if __name__ == '__main__': main()
#include <bits/stdc++.h>
#define REP(i, n) for (int i = 0; i < n; i++)
#define REPR(i, n) for (int i = 0; i >= 0; i--)
#define FOR(i, m, n) for (int i = m; i < n; i++)
#define INF 2e9
#define ALL(v) v.begin(), v.end()
using namespace std;
typedef long long ll;

int main() {
  int r, g;
  cin >> r >> g;
  cout << 2 * g - r << endl;
  return 0;
}


### FIXED CODE ###

r = int(input())
g = int(input())

print(2 * g - r)
a,b=int(input()),list(map(int,input().split()));b.sort();c=(b[0]+b[-1])//2;if (b[0]+b[-1])%2==1 and c+1 in b:c+=1;d=[(b[i]-c)**2 for i in range(a)];print(sum(d))

### FIXED CODE ###

a,b=int(input()),list(map(int,input().split()))
ans=-1
for i in range(-100,100+1):
  c=0
  for j in range(a):c+=(b[j]-i)**2
  if ans==-1:ans=c
  elif ans>c:ans=c
print(ans)
#include <bits/stdc++.h> 
using namespace std; 
  
// Function to return the count of 
// trailing 0s in the given function 
int findTrailingZeros(int n) 
{ 
    // If n is odd 
    if (n & 1) 
        return 0; 
  
    // If n is even 
    else { 
        int ans = 0; 
  
        // Find the trailing zeros 
        // in n/2 factorial 
        n /= 2; 
        while (n) { 
            ans += n / 5; 
            n /= 5; 
        } 
  
        // Return the required answer 
        return ans; 
    } 
} 
  
// Driver code 
int main() 
{ 
    int n;
    cin>>n; 
  
    cout << findTrailingZeros(n); 
  
    return 0; 
} 

### FIXED CODE ###

def findTrailingZeros(n): 
      
    if (n%2!=0): 
        return 0

    else: 
        ans = 0
        n //= 2
        while (n): 
            ans += n // 5
            n //= 5
  
        return ans 
  
n = int(input())
  
print(findTrailingZeros(n))
from collections import deque

n,u,v = map(int,input().split())
edge = [[] for _ in range(n+1)]
for i in range(n-1):
    a,b = map(int,input().split())
    edge[a].append(b)
    edge[b].append(a)
q = deque()
step = [0 for _ in range(n+1)]
q.appendLeft([v,0])
visied = set()
visied.add(v)
while len(q)>0:
    a,v = q.pop()
    for node in edge[a]:
        if node not in visied:
            step[node] = v+1
            q.appendLeft([node,v+1])
            visied.add(node)           
q =[]
q.appendLeft((u,0))
mx= 0
queue = set()
queue.add((u,0))
while len(q)>0:
    a, v = q.pop()
    p=0
    value =0
    for node in edge[a]:
        cur = v+1
        if cur<step[node]:
            add = (node,cur)
            if add not in queue:
                q.appendLeft(add)
                queue.add(add)
                p=1
        else:
            value = max(value,step[node])
    if p ==0:
        mx = max(mx,value)
# print(step)
print(mx)


### FIXED CODE ###

from collections import deque

INF = -1

n, t, a = map(int, input().split())
t -= 1
a -= 1
g = [[] for _ in range(n)]
for _ in range(n - 1):
    u, v = map(lambda x: int(x) - 1, input().split())
    g[u].append(v)
    g[v].append(u)

def bfs(start):
    dist = [INF] * n
    dist[start] = 0
    q = deque([start])
    while q:
        cur = q.pop()
        for to in g[cur]:
            if dist[to] == INF:
                dist[to] = 1 + dist[cur]
                q.appendleft(to)
    return dist

distT = bfs(t)
distA = bfs(a)
ret = 0
for v in range(n):
    if distT[v] < distA[v]:
        ret = max(ret, distA[v] - 1)
print(ret)
N = input()
 
if int(N) <= int(N[0] * 3):
    print(int(N[0] * 3))
else:
    print(int((N[0] + 1) * 3))

### FIXED CODE ###

N = input()
 
if int(N) <= int(N[0] * 3):
    print(int(N[0] * 3))
else:
    print(int(str((int(N[0]) + 1)) * 3))
s=list(input())
print(s)
l=len(s)
data =[]
for i in s:
  if i=="0":
    data.append(0)
  elif i=="1":
    data.append(1)
  else:
    if data!=[]:
      del data[-1]
print("".join(data))

### FIXED CODE ###

s=list(input())
data =[]
for i in s:
  if i=="0":
    data.append(0)
  elif i=="1":
    data.append(1)
  else:
    if data!=[]:
      del data[-1]
 #joinはリストが文字列のみ
data = map(str,data)
print(''.join(data))
s = input()
r = s.count(”0”)
print(min(r, len(s) - r) * 2)

### FIXED CODE ###

s = input()
count_1 = 0
count_0 = 0
ans = 0
for i in range(len(s)):
    if s[i] == "1":
        if count_0:
            ans += 2
            count_0 -= 1
        else:
            count_1 += 1
    else:
        if count_1:
            ans += 2
            count_1 -= 1
        else:
            count_0 += 1
print(ans)
N, A, B = map(int, input().split())

counter = [0 for _ in range(N)]
ans = 0
for i in range(N+1):
    st = str(i)
    for j in range(len(st)):
        counter[i] = counter[i] + st[j]
    if counter[i]>=A and counter[i]<=B :
        ans = ans + i

print(ans)

### FIXED CODE ###

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

for i in range(1, N+1):
    num_sum = 0
    for j in str(i):
        num_sum += int(j)
    if A<= num_sum <= B:
        ans += i

print(ans)
import sys
imput =sys.stdin.readline

p = 10**9 + 7

N,M =map(int,input().split())
lis = [0]*N

for _ in range(M):
    i = int(input())-1
    lis[i] = -1


if lis[0]!=-1:
    lis[0] =1
if lis[1]!=-1:
    lis[1] =1 + max(0,lis[0])

for i in range(N-2):
    i += 2
    if lis[i]!=-1:
        lis[i]= (max(0,lis[i-1])+max(0,lis[i-2]))%p

print(lis[-1])

### FIXED CODE ###


import sys
imput =sys.stdin.readline

p = 10**9 + 7

N,M =map(int,input().split())
lis = [0]*N

for _ in range(M):
    i = int(input())-1
    lis[i] = -1


if lis[0]!=-1:
    lis[0] =1
if N != 1:
    if lis[1]!=-1:
        lis[1] =1 + max(0,lis[0])

for i in range(N-2):
    i += 2
    if lis[i]!=-1:
        lis[i]= (max(0,lis[i-1])+max(0,lis[i-2]))%p

print(max(0,lis[-1]))
base_name = input()
new_name = input()

if new_name[:-1] = base_name:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

name = list(input())
new_name = list(input())
new_name.pop()
 
if name == new_name:
  print('Yes')
else:
  print('No')
import math
a,b=map(int,input().split())
gcd=math.gcd(a,b)
ans=a*b//gcd
print(ans)

### FIXED CODE ###

from fractions import gcd
a,b=map(int,input().split())
gcd=gcd(a,b)
ans=a*b//gcd
print(ans)
a,b,c=map(int,input().split())
print(int(a*b/2)

### FIXED CODE ###

a,b,c=map(int,input().split())
print(int(a*b/2))
a = [int(input()) for i in range(5)]
k = input()
if max(a) - min(a) <= k:
  print("Yay!")
else:
  print(":(")

### FIXED CODE ###

a = [int(input()) for i in range(5)]
k = int(input())
if max(a) - min(a) <= k:
  print("Yay!")
else:
  print(":(")
A = list(map(int, input().split()))
A = sorted(A)

if A[0] == A[1] and A[1] != A[2]:
    print("Yes")
elif A[0] != A[1] and A[1] == A[2]:
    print("Yes")
else
    print("No")


### FIXED CODE ###

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

if A[0] == A[1] and A[1] != A[2]:
    print("Yes")
elif A[0] != A[1] and A[1] == A[2]:
    print("Yes")
else:
    print("No")
r = int(input())
print("{0:.5f} {1:.5f}".format(r**2 * 3.141592653589, 2 * r * 3.141592653589))



### FIXED CODE ###

import math
r = float(input())  #入力値が実数の時
print("{0} {1}".format(r**2 * math.pi, 2 * r * math.pi))
WHITE = 0
GRAY = 1
BLACK = 2
color = [WHITE for i in range(n)]
d, f = [0 for i in range(n)]
t = 1

def visit(u):
    global color, d, f, t
    color[u] = GRAY
    d[u] += t
    t += 1
    for v in range(n):
        if (M[u][v] == 0):
            continue
        else:
            if (color[v] == WHITE):
                visit(v)
    color[u] = BLACK
    f[u] = t
    t += 1

n = int(input())
M = [[0 for i in range(n)] for i in range(n)]
for i in range(n):
    tmp = list(map(int, input().split()))
    for i in range(tmp[1]):
        M[tmp[0]-1][tmp[i+2]-1] = 1

for u in range(n):
    if (color[u] == WHITE):
        visit(u)
for u in range(n):
    print(str(u+1), str(d[u]), str(f[u]), sep = " ")

### FIXED CODE ###

def dfs(u):
    global dfs_color, d, f, t
    color[u] = GRAY
    d[u] += t
    t += 1
    for v in range(n):
        if (M[u][v] == 0):
            continue
        else:
            if (color[v] == WHITE):
               dfs(v)
    color[u] = BLACK
    f[u] = t
    t += 1

n = int(input())
M = [[False for i in range(n)] for j in range(n)]
for i in range(n):
    tmp = list(map(int, input().split()))
    for j in range(tmp[1]):
        M[tmp[0]-1][tmp[j+2]-1] = True

WHITE = 0
GRAY = 1
BLACK = 2
color = [WHITE for i in range(n)]
d = [0 for i in range(n)]
f = [0 for i in range(n)]
t = 1

for u in range(n):
    if (color[u] == WHITE):
        dfs(u)
for u in range(n):
    print(str(u+1), str(d[u]), str(f[u]), sep = " ")
n = int(input())
nums = list(map(int, input().split()))
sum = 1
i = 0
upper = pow(10, 18)
for i in nums:
  sum *= nums[i]
  if sum > upper:
    print(-1)
    exit()
print(sum)

### FIXED CODE ###

n = int(input())
nums = list(map(int, input().split()))
sum = 1
flag = 1
upper = pow(10, 18)
for num in nums:
  if num == 0:
    sum = 0
    flag = 1
    break
  if flag == 1:
    sum = sum * num
    if sum > upper:
      flag = 2

if flag == 1:
  print(sum)
elif flag == 2:
  print(-1)
n=int(input())
s=[int(input()) for i in range(n)]
 
print(sum(s)-max(s)//2)

### FIXED CODE ###

n,m=map(int, input().split())
a= [list(map(int,input().split())) for i in range(n)]
for i in range(n):
    del a[i][0]
v=[]

x=0
for i in range(1,m+1):
    for j in range(n):
        v.append(a[j].count(i))

for i in range(0,m*n,n):
  
    if v[i:i+n].count(1)==n:
        x+=1

  
print(x)
import numpy as np;
from numba import jit
import warnings
from operator import mul
from functools import reduce
warnings.simplefilter('ignore')
    

if __name__ == '__main__':
    try:

        N = int(input())
        A = list(map(int, input().split()))
        ans = reduce(mul, A)
        if ans > 10 ** 18:
            print(-1)
        else:
            print(ans)
    except:
        if 0 in A:
            print(0)
        else:
            print(-1

### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
A.sort()
ans = 1
for a in A:
    ans *= a
    if ans > 1000000000000000000:
            print(-1)
            quit()
print(ans)
import sys
input = sys.stdin.readline

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

A = [ 0 for _ in range(N)]
tmp=0
N = N+1
H.insert(0,-100)

for i in range(N-1,0,-1):
    if(H[i] <= H[i-1]):
        tmp +=1
    else:
        A[i]= tmp
        tmp = 0

print(max(A))

### FIXED CODE ###

import sys
input = sys.stdin.readline

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


N = N+1
H.insert(0,-100)

A = [ 0 for _ in range(N)]
tmp=0

for i in range(N-1,0,-1):
    if(H[i] <= H[i-1]):
        tmp +=1
    else:
        A[i]= tmp
        tmp = 0

print(max(A))
#どの 2 つの街の間も、道を何本か通ることで行き来することができる
cnts=[0]*4
for i in range(3):
    ai,bi=map(int, input().split())
    ai-=1;bi-=1
    cnts[ai]+=1;cnts[bi]+=1
for i in range(4):
    if cnts>2:
        print("NO")
        exit()
print("YES")


### FIXED CODE ###

#どの 2 つの街の間も、道を何本か通ることで行き来することができる
cnts=[0]*4
for i in range(3):
    ai,bi=map(int, input().split())
    ai-=1;bi-=1
    cnts[ai]+=1;cnts[bi]+=1
for i in range(4):
    if cnts[i]>2:
        print("NO")
        exit()
print("YES")
import math
a,b,x=map(int,input().split())
if x<=a*a*b/2:
    y=b/((b**2+(2*x/(a*b))**2)**0.5)
    print(90-math.degrees(math.acos(y)))
else:
    y=2*(a*a*b-x)/(a*a)
    z=(a*a+2*(a*a*b-x)/(a*a))**0.5
    print(90-math.degrees(math.acos(y/z)))

### FIXED CODE ###

import math
a,b,x=map(int,input().split())
if x<=a*a*b/2:
    h=2*x/a/b
    print(math.degrees(math.atan(b/h)))
else:
    h=2*(a*a*b-x)/a/a
    print(math.degrees(math.atan(h/a)))
import collections
N, M = map(int, input().split())
H = list(map(int, input().split()))

root = dict()
non_root = []
if M == 1:
    print(N-1)

for i in range(M):
    A, B = map(int, input().split())
    non_root.append(A)
    non_root.append(B)

    if H[A-1] > H[B-1]:
        root[A] = H[A-1]
        if B in root.keys():
            root.pop(root[B])
    elif H[A-1] < H[B-1]:
        root[B] = H[B - 1]
        if A in root.keys():
            root.pop(root[A])
    else:
        if B in root.keys():
            root.pop(root[B])
        if A in root.keys():
            root.pop(root[A])

print(len(root)+ (N- len(set(non_root))))

### FIXED CODE ###

import copy
N, M = map(int, input().split())
H = list(map(int, input().split()))

H2 = copy.copy(H)
for i in range(M):
    A, B = map(int, input().split())
    if H[A - 1] > H[B - 1]:
        H2[B - 1] = False
    elif H[A - 1] < H[B - 1]:
        H2[A-1] = False
    else:
        H2[A - 1] = False
        H2[B - 1] = False

H3 = H2.count(False)

print(len(H) - H3)
N,T = map(int,input().split())
paths = []
for i in range(N):
	cost, time = map(int,input().split())
   	if time < T: 
	  	paths.append(cost)
print(min(paths))
    

### FIXED CODE ###

N,T = map(int,input().split())
paths = []
for i in range(N):
  cost, time = map(int,input().split())
  if time <= T:
    paths.append(cost)
if len(paths) == 0:
  print("TLE")
else:
  print(min(paths))