Harryxun/stf_run huggingface dataset:
n = int(input())
a = list(map(int,input().split()))

cnt = 1

if a in 0:
    print(-1)
else:
    for i in range(n):
        cnt = cnt * a[i]

    if cnt > 10**18:
        print(-1)
    else:
        print(cnt)

### FIXED CODE ###

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

    if 0 in A:
        print(0)
        return

    prod = 1
    for a in A:
        prod *= a
        if prod > 1000000000000000000:
            print(-1)
            return

    print(prod)


main()
#a
n = int(input())
print(n%((n//1000)*1000))

### FIXED CODE ###

n = int(input())
while n>1000:
    n-=1000
print(1000-n)
l, r = map(int, input().split())
 
v = []
 
if l*r < 2019:
    print(l*r)
else:
    for a, i in enumerate(range(l, r+1)):
        for j in range(l+a+1, r+1):
            if i*j%2019 in v:
                print(min(v))
                exit()
            else:
                v.append(i*j%2019)
                
    print(min(v))

### FIXED CODE ###

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

print(min(n*a, b))
a = int(input())
li = list(map(int,input().split()))

count = 0

for i in range(a):
    # if li[-1] == li[i]:
    #     continue
    if i == a-1:
        continue
    else:
        if li[-5] == li[i]:
            count += 1
    for j in li[i+1:]:
        if li[i] == j:
            count += 1
        else:
            pass

if count > 0:
    print('NO')
else:
    print("YES")

### FIXED CODE ###

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

is_break = False
seen = set()
for a in A:
    if a not in seen:
        seen.add(a)
    else:
        is_break=True
        break

if is_break:
    print('NO')
else:
    print('YES')
N=int(input())
S=list(input())

count=S.count(".")
first=S.index("#")

print(count-first) if "#" in S else print(N)

### FIXED CODE ###

N=int(input())
S=input()

white=S.count(".")
countb=0
ans=white

for i in range (len(S)):
  if S[i]==".":
    white -=1
  else:
    countb +=1 
  ans=min(ans, countb+white)

print(ans)
def main():
    r1 = input()
    n, m = map(int, r1.split(" "))
    v = ["~"] * n
    for v in range(m):
        r = input()
        s, c = map(int, r1.split(" "))
        v[s] = c
        if v[s] != "~" and v[s] != c:
            print(-1)
            return
    for x in range(len(v)):
        if v[x] == '~':
            v[x] = 0
    sv = "".join(v)
    res = int(sv)
    res_str = str(res)
    if len(sv) != len(res_str):
        print(-1)
        return
    print(res_str)

main()
    

### FIXED CODE ###

def main():
    r1 = input()
    n, m = map(int, r1.split(" "))
    v = ["~"] * n
    for t in range(m):
        r = input()
        s, c = map(int, r.split(" "))
        s -= 1
        if v[s] != "~" and v[s] != str(c):
            print(-1)
            return
        v[s] = str(c)
    if n >= 2 and v[0] == '~':
        v[0] = "1"
    for x in range(n):
        if v[x] == '~':
            v[x] = "0"
    sv = "".join(v)
    res = int(sv)
    res_str = str(res)
    if len(res_str) != n:
        print(-1)
        return
    print(res_str)

main()
# -*- coding: utf-8 -*-
l = [0] 
r = [0]
all_gate_clear = 0
num = 0


#numcard
#gatenum
N, M = map(int, input().split())
card_count = range(N+1)

#idカードの生成
for i in range(1,M+1):
    l_temp,r_temp = map(int, input().split())
    l.append(l_temp)
    r.append(r_temp)
    
for gate_num in range(1,M+1):
    #1ゲートの処理
    for card in range(1,N+1):
        num = 0
        while r[gate_num] >= l[gate_num] + num:
            if l[gate_num] + num == card:
                if card_count[card] == gate_num -1:
                    card_count[card] += 1
                    break
            num += 1

for card in range(1,N+1):
    if card_count[card] == M:
        all_gate_clear += 1

print(all_gate_clear)

### FIXED CODE ###

# -*- coding: utf-8 -*-
l = [] 
r = []
count = 0

N, M = map(int, input().split())
l = [0] * M
r = [0] * M
for i in range(0,M):
    l[i], r[i] = map(int, input().split())

#idカードの生成
    
ml = max(l)
mr = min(r)

for i in range(1,N+1):
    if  ml <= i and i <= mr:
        count += 1

print(count)
import sys

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

input = sys.stdin.readline
N, M = map(int, input().split())
uf = UnionFind(N)
for _ in range(M):
    a, b = map(int, input().split())
    uf.union(a, b)

print(uf.group_count() - 1)

### FIXED CODE ###

import sys

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n

    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]

    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)

        if x == y:
            return

        if self.parents[x] > self.parents[y]:
            x, y = y, x

        self.parents[x] += self.parents[y]
        self.parents[y] = x

    def size(self, x):
        return -self.parents[self.find(x)]

    def same(self, x, y):
        return self.find(x) == self.find(y)

    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]

    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())

    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}

    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

input = sys.stdin.readline
N, M = map(int, input().split())
uf = UnionFind(N)
for _ in range(M):
    a, b = map(int, input().split())
    uf.union(a-1, b-1)

print(uf.group_count() - 1)
n = int(input())
di = {}
li = []
ans = ""
for i in range(26):
    di[i+1] = chr(i+97)
while n != 0:
    li.append(di[n % 26])
    n = n // 26
for c in reversed(li):
    ans += c
print(ans)


### FIXED CODE ###

n = int(input())
ans = ""
while n != 0:
    n -= 1
    ans += chr(97 + n%26)
    n = n//26
for c in reversed(ans):
    print(c, end="")
n = int(input())
as = list(map(int,input().split()))

ans = 1

for i in as:
    ans *= i

ans = min(ans, 10*18+1)
if ans == 10**18+1:
    print('-1')\
    break

print(ans)


### FIXED CODE ###

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

ans = 1

for i in As:
    ans *= i
    ans = min(ans, 10**18 + 1)

if ans == 10**18 + 1:
    print(-1)

else:
    print(ans)
s = int(input())
m = s/60
h = m/60

print(h ":" m ":" s):

### FIXED CODE ###

a = int(input())
h = int(a/3600)
m=int((a%3600)/60)
s=int((a%3600)%60)

print(h,m,s,sep=":")
n, a, b = map(int, input().split())

min_b = -((-n) // a)

if not(min_b <= b and a + b <= n + 1):
    print(-1)
else:
    print(re)

### FIXED CODE ###

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

min_b = -((-n) // a)
if not(min_b <= b and a + b <= n + 1):
    print(-1)
    exit()

ans = []
i = 0
while True:
    tmp = []
    break_flag = False
    for j in range(a):
        if i * a + j >= n:
            break_flag = True
            break
        tmp.append(i * a + j + 1)
    if not tmp:
        break
    ans.append(tmp)
    i += 1
    if break_flag:
        break

ans.sort(reverse=True)
nokori_b = b - len(ans)

for i in range(len(ans) - 1):
    cnt_elems = len(ans[i])
    if nokori_b >= len(ans[i]) - 1:
        ans[i].sort(reverse=True)
        nokori_b -= (len(ans[i]) - 1)
    else:
        ans[i] = sorted(ans[i][:nokori_b + 1], reverse=True) + ans[i][nokori_b + 1:]
        break

res = []
for li in ans:
    for num in li:
        res.append(num)
print(*res)
w, h, x, y = map(int, input().split())

if (x == w // 2 and y == h // 2) and w % 2 == 0 and h % 2 == 0:
    print(w * h / 2, 1)
else:
    print(w * h / 2, 0)

### FIXED CODE ###

x, a = map(int, input().split())

if x < a:
    print("0")
elif x >= a:
    print("10")
import sys
import itertools
import numpy as np

lines = sys.stdin.readlines()

N = int(lines[0].rstrip())
perms = list(itertools.permutations(range(N)))
combs = list(itertools.combinations(range(N), 2))

arr_2d = np.zeros((N,2))
arr_dist_memo = np.zeros((len(combs),len(combs)))
arr_dist_ave = np.zeros(len(perms))

for i, line in enumerate(lines[1:]):
    x, y = map(int,line.split(' '))
    arr_2d[i, 0] = x
    arr_2d[i, 1] = y

for i,j in combs:
    arr_dist_memo[i, j] = np.linalg.norm(arr_2d[i] - arr_2d[j])

for index, l in enumerate(perms):
    for i, j  in zip(range(N-1), range(1, N)):
        arr_dist_ave[index] += arr_dist_memo[l[i],l[j]]

print(np.mean(arr_dist_ave)*2)

### FIXED CODE ###

import sys
import itertools
import numpy as np

lines = sys.stdin.readlines()

N = int(lines[0].rstrip())
perms = list(itertools.permutations(range(N)))
combs = list(itertools.combinations(range(N), 2))

arr_2d = np.zeros((N,2))
if N <= 2:
	arr_dist_memo = np.zeros((len(combs)+1,len(combs)+1))
else:
	arr_dist_memo = np.zeros((len(combs),len(combs)))

arr_dist_ave = np.zeros(len(perms))

for i, line in enumerate(lines[1:]):
    x, y = map(int,line.split(' '))
    arr_2d[i, 0] = x
    arr_2d[i, 1] = y

for i,j in combs:
    arr_dist_memo[i, j] = np.linalg.norm(arr_2d[i] - arr_2d[j])

for index, l in enumerate(perms):
    for i, j  in zip(range(N-1), range(1, N)):
        arr_dist_ave[index] += arr_dist_memo[l[i],l[j]]

print(np.mean(arr_dist_ave)*2)
S=input()
max=0
for i in range(len(S)):
  if S[i]=="A" or S[i]=="T" or S[i]=="C" or S[i]=="G":
    l+=1
  else:
    if max<l:
      max=l
    l=0
print(l)

### FIXED CODE ###

S=input()
max=0
l=0
for s in S:
  if (s=="A" or s=="T" or s=="C" or s=="G"):
    l+=1
  else:
    if max<l:
      max=l
    l=0
if max<l:
  max=l
print(max)
x, n = map(int, input().split())
if n == 0:
    print(x)
    sys.exit()

p = list(map(int, input().split()))

#p.sort()

for i in range(101):
    if x -i not in p:
        print(x-i)
        exit()
    elif x +i not in p:
        print(x+i)
        exit()

### FIXED CODE ###

x, n = map(int, input().split())
if n == 0:
    print(x)
    exit()

p = list(map(int, input().split()))

#p.sort()

for i in range(101):
    if x -i not in p:
        print(x-i)
        exit()
    elif x +i not in p:
        print(x+i)
        exit()
n,k=map(int,input().split())
s=input()

I=[0,]

for i in range(n-1):
    if s[i]!=s[i+1]:
        I.append(i+1)

if len(I)<k:
    for _ in range(10**5):
        I.append(n)

print(I)

X=[]

for i in range(len(I)):
    if s[I[i]]=='0':
        X.append(I[i+2*k]-I[i])
    else:
        X.append(I[i+2*k+1]-I[i])

print(max(X))

### FIXED CODE ###


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

I=[0]

for i in range(n-1):
    if s[i]!=s[i+1]:
        I.append(i+1)
        
r=len(I)

for _ in range(10**6):
        I.append(n)

X=[]

for i in range(r):
    if s[I[i]]=='0':
        X.append(I[i+2*k]-I[i])
    else:
        X.append(I[i+2*k+1]-I[i])

print(max(X))
n, x = map(int,input().split())

L = [map(int,input().split())]

ans = int(1)
t = int(0)
for i in range(n):
    t += L[i]
    if t <= x:
        ans += 1

print(ans)

### FIXED CODE ###

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

L = list(map(int,input().split()))

ans = int(1)
t = int(0)
for i in range(n):
    t += int(L[i])
    if t <= x:
        ans += 1

print(ans)
init_input=map(int, raw_input().split())

mem=raw_input()
mem_list=list(mem)

man=init_input[0]
jap=init_input[1]
ove=init_input[2]

jas=0
ovs=0

for i in range(man):
  if mem==a and jas+ovs<jap+ove:
    jap+=1
    print "Yes"
  elif mem==b and jas+ovs<jap+ove and ovs<ove:
    ovs+=1
    print "Yes"
  else:
    print "No"

### FIXED CODE ###

init_input=map(int, raw_input().split())

mem=raw_input()
mem_list=list(mem)

man=init_input[0]
jap=init_input[1]
ove=init_input[2]

jas=0
ovs=0

for i in range(man):
    if mem[i]=="a" and jas+ovs<jap+ove:
        jas+=1
        print "Yes"
    elif mem[i]=="b" and jas+ovs<jap+ove and ovs<ove:
        ovs+=1
        print "Yes"
    else:
        print "No"
def main():
    x,y = map(int,input().split())
    tmp = []
    i = 2
    ans = 0
    if x == y:
        ans += 1
    for i in range(2,min((-(-x**0.5//1))+1,(-(-y**0.5//1)+1))):


        if i > x or i > y:
            break
        if x % i ==0 and y % i == 0:
            tmp.append(i)
            while True:
                if x % i == 0:
                    x = x//i
                else:
                    break
            while True:
                if y % i == 0:
                    y = y//i
                else:
                    break
        i += 1
    ans += len(tmp) + 1

    print(ans)
    # print(tmp)
if __name__=='__main__':
    main()


### FIXED CODE ###

def main():
    x,y = map(int,input().split())
    tmp = [1]
    i = 2
    ans = 0
    # if x == y:
    #     ans += 1
    # a = factorization(x)
    # print(a)
    tempx = x

    for i in range(2, int(-(-x**0.5//1))+1):
        if tempx % i == 0:
            tmp.append(i)
            while tempx % i == 0:

                tempx //= i
    if tempx!=1:
        tmp.append(tempx)
    # print(tmp)

    for i,a in enumerate(tmp):
        if y % a == 0:
            tmp[i] = 1
        else:
            tmp[i] = 0
    print(sum(tmp))


if __name__=='__main__':
    main()
n = int(list(input()))
if 7 in n:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

n = list(input())
n = list(map(int, n))
if 7 in n:
    print('Yes')
else:
    print('No')
S = ' ' + input()
even_dance = ['R','U','D']
odd_dance = ['L','U','D']

flag = True

for i in range(1,len(S)):
	if i % 2 == 1:
      if S[i] in even_dance:
        pass
      else:
        flag = False
        break
        
	else:
      if S[i] in odd_dance:
        pass
      else:
        flag = False
        break
if flag:
  print('Yes')
else:
  print('No')


### FIXED CODE ###

S = ' ' + input()
even_pat = ['R','U','D']
odd_pat = ['L','U','D']

flag = True

for i in range(1,len(S)):
    if i % 2 == 1:
        if not(S[i] in even_pat):
            flag = False
            break
    
    else:
        if not(S[i] in odd_pat):
            flag = False
            break

print('Yes' if flag else 'No')
import math
n = int(input())
t,a = map(int,input().split())
hight = list(map(int, input().split()))
ans = 100000
ansnumber = 0

for num,i in enumerate(hight):
    tmp = math.fabs(t-i*0.006 - a)
    if ans > tmp:
         ans = tmp
         ansnumber = num+1

### FIXED CODE ###

x,y = map(int ,input().split())
print(int(x+y/2))
N=int(input())
for i in range(1,N//(1.08)+3): #X
  if int(i*1.08)==N:
    print(i)
    exit()
print(":(")

  

### FIXED CODE ###

N=int(input())
for i in range(1,N+1):
  if int(i*1.08)==N:
    print(i)
    exit()
print(":(")
N = int(input())
num_li = list(map(int, input().split()))

def gcd(mn, xn):
  if xn == 0:
    return mn
  else:
    return gcd(xn, mn%xn)

ans = 0  
for i in range(N):
  if i < N-1:
    ans = gcd(num_li[i], num_li[i+1])
    if ans == 1:
      print(1)
      exit()
    else:
      ans += gcd(num_li[i], num_li[i+1] 
  
print(ans/N)

### FIXED CODE ###

n = input()
a = list(map(int, input().split()))
import functools, fractions
print(functools.reduce(fractions.gcd, a))
import math
def findFactors(n):
    now=n
    f=[]
    while now%2==0:
        now//=2
        f.append(2)
    p=3
    while p<=math.sqrt(n):
        while now%p==0:
            now//=p
            f.append(p)
        p+=2
        if now==1:
            break
    if now>math.sqrt(n):
        f.append(now)
    return f

def cmb(n,r):
    if (r<0 or r>n):
        return 0
    r=min(r,n-r)
    return g1[n]*g2[r]*g2[n-r]%mod

mod=10**9+7
N=10**5+100
g1=[1,1]
g2=[1,1]
inverse=[0,1]

#n!とその逆元を求めておく
for i in range(2,N+1):
    g1.append((g1[-1]*i)%mod)
    inverse.append((-inverse[mod%i]*(mod//i))%mod)
    g2.append((g2[-1]*inverse[-1])%mod)

n,m=map(int,input().split())
F=findFactors(m)
ans=1

now=F[0]
cnt=0
for f in F:
    if f==now:
        cnt+=1
    else:
        ans*=cmb(n-1+cnt,cnt)
        ans%=mod
        now=f
        cnt=1
ans*=cmb(n-1+cnt,cnt)
ans%=mod
print(ans)

### FIXED CODE ###

import math
import sys

def findFactors(n):
    now=n
    f=[]
    while now%2==0:
        now//=2
        f.append(2)
    p=3
    while p<=math.sqrt(n):
        while now%p==0:
            now//=p
            f.append(p)
        p+=2
        if now==1:
            break
    if now>math.sqrt(n):
        f.append(now)
    return f

def cmb(n,r):
    if (r<0 or r>n):
        return 0
    r=min(r,n-r)
    return g1[n]*g2[r]*g2[n-r]%mod

mod=10**9+7
N=10**5+100
g1=[1,1]
g2=[1,1]
inverse=[0,1]

#n!とその逆元を求めておく
for i in range(2,N+1):
    g1.append((g1[-1]*i)%mod)
    inverse.append((-inverse[mod%i]*(mod//i))%mod)
    g2.append((g2[-1]*inverse[-1])%mod)

n,m=map(int,input().split())
if m==1:
    print(1)
    sys.exit()

F=findFactors(m)
ans=1

now=F[0]
cnt=0
for f in F:
    if f==now:
        cnt+=1
    else:
        ans*=cmb(n-1+cnt,cnt)
        ans%=mod
        now=f
        cnt=1
ans*=cmb(n-1+cnt,cnt)
ans%=mod
print(ans)
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = list(map(int, input().split()))

ans = 0
for i in range(n):
    ans += b[a[i] - 1]
    if i>0 and a[i] == a[i-1]+1:
        ans += c[a[i-1]-1]
        
print(ans)

### FIXED CODE ###

n = int(input())
print(n**3)
N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
dp = [0, 0]
cost = [0,2,5,5,4,5,6,3,7,6]
for i in range(2, N+1):
    dp.append(0)
    for a in A:
        if i >= cost[a]: 
            dp[i] = max(dp[i - cost[a]] + 1, dp[i])
ans = ""
while N > 0:
    for e in A:
        if dp[N] - 1 == dp[N - cost[e]]:
            if dp[N] == 1:
                if N != cost[e]: continue
            N -= cost[e]
            ans += str(e)
            break
print(ans)

### FIXED CODE ###

N, M = map(int, input().split())
A = list(map(int, input().split()))
A.sort(reverse=True)
dp = [0]
cost = [0,2,5,5,4,5,6,3,7,6]
for i in range(1, N+1):
    dp.append(-(2<<10))
    for a in A:
        if i >= cost[a]: 
            dp[i] = max(dp[i - cost[a]] + 1, dp[i])
ans = ""
while N > 0:
    for e in A:
        if N >= cost[e] and dp[N] - 1 == dp[N - cost[e]]:
            if dp[N] == 1:
                if N != cost[e]: continue
            N -= cost[e]
            ans += str(e)
            break
print(ans)
x=list(map(int(),input().split()))
print(max(x[0]*x[1],x[2]*x[3]))

### FIXED CODE ###

x=list(map(int,input().split()))
print(max(x[0]*x[1],x[2]*x[3]))
A = list(map(int,input().split()))
mod = 10**9 + 7
A1 = []  
A2 = []
for i in range(N):
    if A[i] > 0:
        A1.append(A[i])
    if A[i] < 0:
        A2.append(-A[i])
A1.sort(reverse=True)
A2.sort(reverse=True)
ans = 1
if max(A)< 0:
    if K%2 == 0:
        for i in range(K):
            ans = (ans * A2[i])%mod
    else:
        A2.sort()
        for i in range(K):
            ans = (ans * A2[i])%mod
            ans = (mod - ans)%mod
elif max(A) == 0:
    if K%2 == 1:
        ans = 0
    else:
        if len(A2) >= K:
            for i in range(K):
                ans = (ans * A2[i])%mod
        else:
            ans = 0
else:
    A3 = []
    for i in range(len(A2)//2):
        A3.append(A2[2 * i] * A2[2 * i + 1])
    A4 = []
    A5 = []
    for i in range(len(A1)//2):
        A4.append(A1[2 * i] * A1[2 * i + 1])
    for i in range((len(A1) - 1)//2):
        A5.append(A1[2 * i + 1] * A1[2 * i + 2])
    if len(A1) + 2 * len(A3) < K:
        if N == K:
            for i in range(N):
                ans = (ans * A[i])%mod
        else:
            ans = 0
    else:
        if K%2 == 0:
            A6 = A3 + A4
            A6.sort(reverse=True)
            for i in range(K//2):
                ans = (ans * A6[i])%mod
        else:
            A6 = A3 + A5
            A6.sort(reverse=True)
            ans = A1[0]
            for i in range((K - 1)//2):
                ans = (ans * A6[i])% mod
print(ans)
            

### FIXED CODE ###

N,K = map(int,input().split())
A = list(map(int,input().split()))
mod = 10**9 + 7
A1 = []  
A2 = []
for i in range(N):
    if A[i] > 0:
        A1.append(A[i])
    if A[i] < 0:
        A2.append(-A[i])
A1.sort(reverse=True)
A2.sort(reverse=True)
ans = 1
if max(A)< 0:
    if K%2 == 0:
        for i in range(K):
            ans = (ans * A2[i])%mod
    else:
        A2.sort()
        for i in range(K):
            ans = (ans * A2[i])%mod
            ans = (mod - ans)%mod
elif max(A) == 0:
    if K%2 == 1:
        ans = 0
    else:
        if len(A2) >= K:
            for i in range(K):
                ans = (ans * A2[i])%mod
        else:
            ans = 0
else:
    A3 = []
    for i in range(len(A2)//2):
        A3.append(A2[2 * i] * A2[2 * i + 1])
    A4 = []
    A5 = []
    for i in range(len(A1)//2):
        A4.append(A1[2 * i] * A1[2 * i + 1])
    for i in range((len(A1) - 1)//2):
        A5.append(A1[2 * i + 1] * A1[2 * i + 2])
    if len(A1) + 2 * len(A3) < K:
        if N == K:
            for i in range(N):
                ans = (ans * A[i])%mod
        else:
            ans = 0
    else:
        if K%2 == 0:
            A6 = A3 + A4
            A6.sort(reverse=True)
            for i in range(K//2):
                ans = (ans * A6[i])%mod
        else:
            A6 = A3 + A5
            A6.sort(reverse=True)
            ans = A1[0]
            for i in range((K - 1)//2):
                ans = (ans * A6[i])% mod
print(ans)
l = input()

v = (l/3)**2

print(v)



### FIXED CODE ###

l = int(input())

v = (l/3)**3

print(v)
n = int(inpiut())

if n >= 30:
  print("Yes")
else:
  print("No")
  

### FIXED CODE ###

n = int(input())
 
if n >= 30:
  print("Yes")
else:
  print("No")
n, a, b = map(int, input().split())

if 0 == (b-a) % 2:
    print((b-a) // 2)

else:
    upper = max(a-1, b-1)
    lower = max(n-a, n-b)

	print(min(upper, lower))

### FIXED CODE ###

def upper_cnt(a, b):
    upper_cnt = n-b + 1
    a += upper_cnt
    upper_cnt += ((n-a) // 2)    
    return upper_cnt

def lower_cnt(a, b):
    lower_cnt = a-1 + 1
    b -= lower_cnt
    lower_cnt += ((b-1) // 2)
    return lower_cnt

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

if 0 == (b-a) % 2:
    print((b-a) // 2)

else:
    up = upper_cnt(a, b)
    low = lower_cnt(a, b)
    print(min(up, low))
N = str(input())

count = 0
yes = False

for i in range(N):
  a , b = map(int, input().split())
  
  if a==b:
    count +=1
    if count >= 3:
      print("Yes")
      yes = True
      break
  else:
    count = 0

if not(yes):
  print("No")

### FIXED CODE ###

N = int(input())

count = 0
yes = False

for i in range(N):
  a , b = map(int, input().split())
  
  if a==b:
    count +=1
    if count >= 3:
      print("Yes")
      yes = True
      break
  else:
    count = 0

if not(yes):
  print("No")
n = int(input())
p = list(map(int, input().split()))

a = 0

for i in range(n - 1):
  p_l = [p[i], p[i + 1], p[i + 2]]
  p_l2 = sorted(p_l)
  if p_l2[1] == p_l[1]:
    a += 1
    
print(int(a))

### FIXED CODE ###

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

a = 0

for i in range(n - 2):
  p_l = [p[i], p[i + 1], p[i + 2]]
  p_l2 = sorted(p_l)
  if p_l2[1] == p_l[1]:
    a += 1
    
print(int(a))