Harryxun/stf_run huggingface dataset:
import sys
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
n = INT()
A = LIST()
B = LIST()
C = LIST()
ans = 0
for i in range(n):
  if A[i]+1 == A[i+1]:
    ans += C[i]
print(ans + sum(B))

### FIXED CODE ###

import sys
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
n = INT()
A = LIST()
B = LIST()
C = LIST()
ans = 0
for i in range(n-1):
  if A[i]+1 == A[i+1]:
    ans += C[A[i]-1]
print(ans + sum(B))
n, m = map(int, input().split())
sc = [list(map(int, input().split())) for _ in range(m)]

if m == 0:
    if n == 1:
        print(0)
    else:
        print(10 ** (n - 1))
    exit()

ans = -1
for i in range(10 ** n):
    i = str(i)
    for s, c in sc:
        if int(i[s - 1]) != c:
            break
    else:
        ans = i
        break

print(ans)


### FIXED CODE ###

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

if m == 0:
    if n == 1:
        print(0)
    else:
        print(10 ** (n - 1))
    exit()

if n == 1:
    left = 0
else:
    left = 10 ** (n - 1)
right = 10 ** n

ans = -1
for i in range(left, right):
    i = str(i)
    for s, c in sc:
        if int(i[s - 1]) != c:
            break
    else:
        ans = i
        break

print(ans)
N,K=map(int,input().split())

S=[[]for i in range(10**5+1)]
for i in range(N):
    a,b=map(int,input().split())
    S[a].append(b)
S.sort(reverse=True)
#print(S[:10])

k=0
o=0
E=[]
for i in range(len(S)):
    if S[i]==[]:
        break
    else:
        S[i].sort(reverse=True)
        k+=1
        o+=S[i][0]
        E.append(S[i][0])
        del S[i][0]
E.sort()
#print(S)
S.sort(reverse=True)
A=[]
if k>K:
    for i in range(k-K):
        A.append(E[i])
        o-=E[i]
    for i in range(k-K):
        del E[i]
        k-=1
#print(A)
for i in range(len(S)):
    if S[i]==[]:
        break
    else:
        for j in range(len(S[i])):
            A.append(S[i][j])
A.sort(reverse=True)
#print(A)
if K-k>0:
    for i in range(K-k):
        o+=A[i]
        del A[i]
        #print(i)
    
    #print(A)
    #print(E)
for i in range(min(K,len(A))):
    if k*k+o<=(k-1)**2+o-E[i]+A[i]:
        k=(k-1)
        o=o-E[i]+A[i]
    else:
        break
print(k*k+o)

### FIXED CODE ###

Num,K=map(int,input().split())
L=[[]for i in range(Num+1)]
for i in range(Num):
    t,d=map(int,input().split())
    L[t].append(d)
for i in range(1,Num+1):
    L[i].sort(reverse=True)

M=[]
m=[]
for i in range(1,Num+1):
    if len(L[i])>=1:
        M.append(L[i][0])
        if len(L[i])>=2:
            for j in range(1,len(L[i])):
                m.append(L[i][j])
M.sort(reverse=True)
m.sort(reverse=True)
MM=[0]
for i in range(len(M)):
    MM.append(MM[-1]+M[i])
mm=[0]
for i in range(len(m)):
    mm.append(mm[-1]+m[i])
#print(MM)
#print(mm)
ANS=0

def cmb(n, r, mod):
    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+10
g1 = [1, 1] # 元テーブル
g2 = [1, 1] #逆元テーブル
inverse = [0, 1] #逆元テーブル計算用テーブル

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 )

for i in range(1,min(K,len(M))+1):
    ANS=max(i*i+MM[i]+mm[min(len(mm)-1,K-i)],ANS)
    #print(ANS,i)
print(ANS)
def solve():
    import math
    N,M = [int(i) for i in input().split()]
    A = list(map(int, input().split()))

    lcm = A[0]
    for i in range(1, N):
        lcm = lcm * A[i] // math.gcd(lcm, A[i])
    if lcm == 0:
        print('0')
        return
    first = lcm * 0.5

    ans_exists = True
    for i in range(N):
        if first % A[i] == 0:
            ans_exists = False

    if ans_exists:
        ans = int((M-first) // lcm + 1)
        print(ans)
    else:
        print('0')

if __name__ == "__main__":
    solve()

### FIXED CODE ###

def solve():
    import math
    N,M = [int(i) for i in input().split()]
    A = list(map(int, input().split()))

    lcm = A[0]
    for i in range(1, N):
        lcm = lcm * A[i] // math.gcd(lcm, A[i])
    first = lcm // 2

    ans_exists = True
    for i in range(N):
        if first % A[i] == 0:
            ans_exists = False

    if ans_exists:
        ans = int((M-first) // lcm + 1)
        print(ans)
    else:
        print('0')

if __name__ == "__main__":
    solve()
N = input()
N = int(N)
str = input().split()
H = []
i = 0
j = 0
for i in range(N):
  H.append( int(str[i]) )
flag
ans = 0
for i in range(N):
  for j in range(i):
    if H [i] < H[j]:
      flag = 1
    else:
      flag = 0
  if flag == 0:
    ans = ans+1

print(ans)

### FIXED CODE ###

N = input()
N = int(N)
str = input().split()
H = []
i = 0
j = 0
for i in range(N):
  H.append( int(str[i]) )
flag = 0
ans = 0
for i in range(N):
  for j in range(i):
    if H [i] < H[j]:
      flag =  1
      break
    else:
      flag = 0
  if flag == 0:
    ans = ans+1
  flag = 0

print(ans)
A,B,C,D,E,F = (int(x) for x in input().split())

CCT = {}
for a in range(F//(100*A)+1):
    for b in range(F//(100*B)+1):
        water = (a*A+b*B)*100
        max_suger = water*E//100
        for c in range(max_suger//C+1):
            for d in range(max_suger//D+1):
                suger = c*C+d*D
                if water + suger > F:
                    continue
                if max_suger < suger:
                    continue
                if water+suger == 0:
                    continue
                CCT[water,suger] = 100*suger/(water+suger)

max_cct = 0
for (water,suger),cct in CCT.items():
    if cct > max_cct:
        max_cct = cct
        ans = [water+suger, suger]
print(*ans)


### FIXED CODE ###

A,B,C,D,E,F = (int(x) for x in input().split())

CCT = {}
for a in range(F//(100*A)+1):
    for b in range(F//(100*B)+1):
        water = (a*A+b*B)*100
        if water > F:
            continue
        max_suger = water*E//100
        for c in range(max_suger//C+1):
            for d in range(max_suger//D+1):
                suger = c*C+d*D
                total = water + suger
                if total > F or total == 0:
                    continue
                if max_suger < suger:
                    continue
                CCT[water,suger] = suger/total

ans = (A*100, 0)
max_cct = 0
for (water,suger),cct in CCT.items():
    if cct > max_cct:
        max_cct = cct
        ans = (water+suger, suger)
print(*ans)
N = int(input())
A = list(map(int, input().split()))


def gcd(a,b):
    if b == 0:
        return a
    return gcd(b, a % b)


def m():
    left, right = A.copy(), A.copy()
    for i in range(1, N):
        left[i] = gcd(A[i], left[i-1])

    for i in reversed(range(0, N-1)):
        right[i] = gcd(A[i], right[i+1])

    res = max(left[N-1], right[1])
    for i in range(1, N-1):
        res = max(gcd(left[i-1],right[i+1]), res)
    return res


print(m())


### FIXED CODE ###

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


def gcd(a,b):
    if b == 0:
        return a
    return gcd(b, a % b)


def m():
    left, right = A.copy(), A.copy()
    for i in range(1, N):
        left[i] = gcd(A[i], left[i-1])

    for i in reversed(range(0, N-1)):
        right[i] = gcd(A[i], right[i+1])

    res = max(left[N-2], right[1])
    for i in range(1, N-1):
        res = max(gcd(left[i-1],right[i+1]), res)
    return res


print(m())
/* Author - thiolhub */

#include <bits/stdc++.h>

using namespace std;

#define ll              long long int
#define ld              long double
#define db              double
#define pi              3.1415926535897932384626
#define PI              acos(-1.0)
#define endl            "\n"
#define mod             1000000007
#define mk              make_pair
#define pb              push_back
#define pii             pair<int,int>
#define vi              vector<int>
#define mii             map<int,int>
#define pqb             priority_queue<int>
#define pqs             priority_queue<int,vi,greater<int> >
#define setbits(x)      __builtin_popcountll(x)
#define zrobits(x)      __builtin_ctzll(x)
#define ps(x,y)         fixed<<setprecision(y)<<x
#define w(t)            ll t; cin>>t; while(t--)
#define sc(a)	        scanf("%lld",&a);
#define pr(a)	        printf("%lld\n",a)
#define f(i,a,n)		for(ll i=a;i<n;i++)
#define m(a)		    memset(a,0,sizeof(a))
#define FastIO          ios_base::sync_with_stdio(0);cin.tie(0),cout.tie(0)



int main(){ FastIO;

int n,i,j,k;cin>>n;
int a[n]; for(i=0;i<n;i++) cin>>a[i];
int dp[n+1];
for(i=0;i<n;i++) dp[i]=INT_MAX;
dp[0]=0;
for(i=0;i<n-1;i++)
{
	dp[i+1]=min(abs(a[i+1]-a[i])+dp[i],dp[i+1]);
	dp[i+2]=min(abs(a[i+2]-a[i])+dp[i],dp[i+2]);
}
cout<<dp[n-1];

return 0;
}


### FIXED CODE ###

def rec(a):
    dp=[0]*len(a)
    for i in range(len(a)):
        if i==0:
            dp[i]=0
        elif i==1:
            dp[i]=abs(a[i]-a[i-1])
        else:
            dp[i]=min(abs(a[i]-a[i-1])+dp[i-1],abs(a[i]-a[i-2])+dp[i-2])
    return dp[len(a)-1]
n=int(input())
a=[int(i) for i in input().split()]
print(rec(a))
X = int(input())

tmp = 100
cnt = 
while tmp < X:
    tmp = tmp + int(tmp*0.01)
    cnt += 1

print(cnt)



### FIXED CODE ###

X = int(input())

tmp = 100
cnt = 0
while tmp < X:
    tmp = tmp + int(tmp*0.01)
    cnt += 1

print(cnt)
from math import inf

a = []


def dis(n):
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0:
            a.append(int(i))


num = int(input())
dis(num)
ans = inf
for e in a:
    if e + num // e - 2 < ans:
        ans = e + num // e - 2
    # ans = min(ans, e + num / e - 2)
print(int(ans))


### FIXED CODE ###

def solve(n):
    ans = int(1e12)
    for i in range(1, int(n ** 0.5) + 1):
        if n % i == 0 and i + n // i - 2 < ans:
            ans = i + n // i - 2
    return int(ans)


num = int(input())
print(solve(num))
import decimal
a, b = map(int, input().split())
a = Decimal(str(a))
b = Decimal(str(b))
c = str(a * b)
index = c.find('.')
print(c[:index])


### FIXED CODE ###

# coding: utf-8
# Your code here!
from decimal import Decimal
a, b = input().split()
a = Decimal(str(a))
b = Decimal(str(b))
c = str(a * b)
index = c.find('.')
print(c[:index])
ipt=input().split()
h,w = [int(n) for n in ipt[:1]]
img= [input().split()[2:]]
print(
    for i in w+2:
        '#',
    "/n",
    for i in h:
    '#',img[w*i,w*(i+1)],'#',"/n"
    for i in w+2:
        ,'#')

### FIXED CODE ###

h, w = [int(n) for n in input().split()]

ans=''
for i in range(h):
    ans+='#'+input()+'#'+'\n'
print('#'*(w + 2))
print(ans+'#'*(w + 2))
import math
a,b,x = input().split()
a,b,x = int(a),int(b),int(x)


if(x<=(a*a*b)/2):
    S = x/a
    h = (2*S/b)
    print(90.-math.atan(h/b)/(2.*math.pi)*360)
else:
    x /= a
    d = 2*x/a-b
    print(90.-math.atan(a/(b-d))*360/(2*math.pi))

### FIXED CODE ###

import math
a,b,x = input().split()
a,b,x = int(a),int(b),int(x)


if(x<=(a*a*b)/2):
    S = x/a
    h = (2*S/b)
    print(90.-math.atan(h/b)/(2.*math.pi)*360)
else:
    #a,x = math.sqrt(a),math.sqrt(x)
    x /= a
    d = 2*x/a-b
    if(b==d):
        print(0)
    else:
        print(90.-math.atan(a/(b-d))*360/(2*math.pi))
K X = map(int,input().split())
if K*500 > X:
    print(Yes)
else:
    print(No)

### FIXED CODE ###

K,X = map(int,input().split())
if K*500 >= X:
    print("Yes")
else:
    print("No")
# -*- coding: utf-8 -*-
a, b = map(int, raw_input().split())
if a % 2 and b % 2:
	print "Odd"
else:
	print "Even"

### FIXED CODE ###

a, b = map(int, input().split())
if (a*b)%2 == 1:
    print("Odd")
else:
    print("Even")
X = int(input())

ans = 360/x

print(str(ans))

### FIXED CODE ###

X = int(input())
i = 1

while (360*i) % X != 0:
  i += 1
ans = 360*i//X
print(ans)
N = int(input())
S = input()
K = int(input())

for i in range(N):
  if S[i]!=S[K]:
    S = S.replace(S[i], "*")
  
print(S)

### FIXED CODE ###

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

for i in range(N):
  if S[i]!=S[K-1]:
    S = S.replace(S[i], "*")
  
print(S)
n=int(input())

for i in range(1,(n)//2+1):
    a=i
    if n%a==0:
        b=n//a
        sa=str(a)
        sb=str(b)
        
        #print(a,b,len(sa),len(sb))
        if len(sb)-len(sa)>=0:
            ans=len(sb)
        else:
            #print(b,sb,len(sa),len(sb))
            break

print(ans)

### FIXED CODE ###

n=int(input())

for a in range(1,int(n**0.5+1)):
    if n%a==0:
        b=n//a
        sa=str(a)
        sb=str(b)
        if a<=b:
             ans=len(sb)
        else:
            break

print(ans)
N = int(input())
D = int(input())
an=0
for _ in range(N):
  X, Y= map(int, input().split())
  if X**2+Y**2<=D**2:
    an +=1
print(an)   



### FIXED CODE ###

N, D = map(int, input().split())
an=0
for i in range(N):
  X, Y= map(int, input().split())
  if X**2+Y**2<=D**2:
    an +=1
print(an)
s=input()

for i in range(len(s)-2):
    if s[i]==s[i+1]:
        print(i + 1 ,i+1 + 1)
        exit()
    if s[i]==s[i+2]:
        print(i + 1,i+2 + 1)
        exit()

if s[i-2]==s[i -1 ]:
    print(i-2 +1 ,i-1)
    exit()

print(-1,-1)


### FIXED CODE ###

s=input()

for i in range(len(s)-2):
    if s[i]==s[i+1]:
        print(i + 1 ,i+1 + 1)
        exit()
    if s[i]==s[i+2]:
        print(i + 1,i+2 + 1)
        exit()

if s[-2]==s[-1 ]:
    print(len(s)-1 ,len(s))
    exit()

print(-1,-1)
S = input()
T = [0]*2019
T[0]=1
t = 0
ans = 0
dig = 1
for i in range(n):
    t = (t + (int(S[-i-1]))*dig)%2019
    dig = dig*10%2019
    T[t] += 1
for j in T:
    ans +=int(j*(j-1)/2)
print(ans)

### FIXED CODE ###

S = input()
T = [0]*2019
T[0]=1
t = 0
ans = 0
dig = 1
for i in range(len(S)):
    t = (t + (int(S[-i-1]))*dig)%2019
    dig = (dig*10)%2019
    T[t] += 1
for j in T:
    ans +=int(j*(j-1)/2)
print(ans)
while True:
    H = int(input())
    W = int(input())
    if H == 0 and W == 0:
        break
    for i in range(H):
        print('#'*W)


### FIXED CODE ###

while True:
    H, W = map(int, input().split())
    if H == 0 and W == 0:
        break
    for i in range(H):
        print('#'*W)

    print()
l = [int(x) for x in raw_input().split()]
print "Even" if l[0]*l[i]%2 == 0 else "Odd"

### FIXED CODE ###

l = [int(x) for x in raw_input().split()]
print "Even" if l[0]*l[1]%2 == 0 else "Odd"
import sys

n,m = map(int, input().split())
a = list(map(int,input().split()))
D = []

j = 0
for _ in range(m):
    b,c = map(int, input().split())
    D += [c]*b
D.sort(reverse=True)
for i in range(n):
    if a[i] < D[j]:
        a[i] = D[j]
        j += 1

print(sum(a))

### FIXED CODE ###

from heapq import heappop, heappush


n,m = map(int,input().split())
A = list(map(int,input().split()))
pq = []
ans = 0

for a in A:
    heappush(pq, [-a, 1])
    
for _ in range(m):
    b,c = map(int,input().split())
    heappush(pq, [-c, b])

for i in range(n):
    c,b = heappop(pq)
    c = -c
    ans += c
    if b > 1:
        b -= 1
        heappush(pq, [-c, b])
        
print(ans)
[int(s) for s in l_si]

### FIXED CODE ###

a = str(input())
b = []
c = 0
for i in range(len(a)):
    b.append(int(a[i]))
if sum(b) % 9 == 0:
    print("Yes")
else:
    print("No")
import numpy as np
n = int(input())
num_list = list(map(int,input().split()))

even_cnt = [0]*10**5
odd_cnt = [0]*10**5
for i in range(n):
    if i % 2 == 0:
        even_cnt[num_list[i]] += 1
    else:
        odd_cnt[num_list[i]] += 1
ame = np.argmax(even_cnt)
amo = np.argmax(odd_cnt)
if ame != amo:
    print(len(num_list) - max(even_cnt) -  max(odd_cnt))
    
else:
    tmp_e_max =  max(even_cnt)
    tmp_o_max = max(odd_cnt)
    even_cnt[ame] = 0
    odd_cnt[amo] = 0
    if tmp_e_max-max(even_cnt) >=  tmp_o_max - max(odd_cnt):
        print(len(num_list) - max(odd_cnt) -  tmp_e_max)
    else:
        print(len(num_list) - max(even_cnt) -  tmp_o_max)

### FIXED CODE ###

import numpy as np
n = int(input())
num_list = list(map(int,input().split()))

even_cnt = [0]*(10**5 + 10)
odd_cnt = [0]*(10**5 +10)
for i in range(n):
    if i % 2 == 0:
        even_cnt[num_list[i]] += 1
    else:
        odd_cnt[num_list[i]] += 1
ame = np.argmax(even_cnt)
amo = np.argmax(odd_cnt)
if ame != amo:
    print(len(num_list) - max(even_cnt) -  max(odd_cnt))
    
    
else:
    tmp_e_max =  max(even_cnt)
    tmp_o_max = max(odd_cnt)
    even_cnt[ame] = 0
    odd_cnt[amo] = 0
    if tmp_e_max-max(even_cnt) >=  tmp_o_max - max(odd_cnt):
        print(len(num_list) - max(odd_cnt) -  tmp_e_max)
    else:
        print(len(num_list) - max(even_cnt) -  tmp_o_max)
s, t = input().split()
a, b = map(int, input().split())
u = int(input())
 
if u == s:
  print(s-1,t)
elif u == t:
  print(s, t-1)

### FIXED CODE ###

s, t = input().split()
a, b = map(int, input().split())
u = input()
 
if u == s:
  print(a-1,b)
elif u == t:
  print(a, b-1)
K, X = [map(int, input().split())]
print("Yes") if K*500 >= X else print("No")

### FIXED CODE ###

K, X = map(int, input().split())
print("Yes") if 500 * K >= X else print("No")
import math
N = 5000000000000000
print(N)
S = input()
K = int(input())
for i in S:
  num = int(i)
  if N * math.log(num) > math.log(K):
    print(num)
    break
  else:
    K -= num

### FIXED CODE ###

import math
N = 5000000000000000
S = input()
K = math.log(int(input()))
for i in S:
  num = int(i)
  if num == 1:
    if num == int(math.exp(K)):
      print(num)
      break
    else:
      K = math.log(int(math.exp(K)-1))
      continue
  kk = N * math.log(num)
  if kk >= K:
    print(num)
    break
  else:
    K -= kk
#配列うけとる
a = [input() for i in range(2)]
str1 = list(a[0])
str2 = list(a[1])
count = 0
for i range(3):
  if str1[i]==str2[i]:
    count += 1
    
print(count)

### FIXED CODE ###

a = [raw_input() for i in range(2)]
str1 = list(a[0])
str2 = list(a[1])
count = 0
for i in range(3):
  if str1[i]==str2[i]:
    count += 1

print(count)
A=int(input())
B=int(input())
ans=(A+B-1)//A
print(ans)


### FIXED CODE ###

A,B=map(int,input().split())
if B==1:
    ans=0
elif 1<B and B<=A:
    ans=1
else :
    for k in range(2,100):
        if (k-1)*A-(k-2)<B and B<=k*A-(k-1):
            ans=k
        else:
            k=k+1
print(ans)
n,m,d=map(int,input().split())
if n-d-1==0:
    ans=(m-1)*(2/n**2)
elif n-2*d<=0:
    ans=(m-1)/(n*2*(n-d-1))
else:
    ans=(m-1)*(2/(n*(n-2*d))+(1/(2*n*d)))
print(ans)

### FIXED CODE ###

n,m,d=map(int,input().split())
if d==0:
    ans=(m-1)/n
else:
    ans=2*(m-1)*(n-d)/(n**2)
print(ans)
d = int(input())
t = int(input())
s = int(input())
if t*s >= d:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

D, T, S = map(int, input().split())
if T*S >= D:
  print("Yes")
else:
  print("No")
n=int(input()).split(" ")
A=n[0]
B=n[1]
T=n[2]

bis=int((T+0.5)/A)*B

### FIXED CODE ###

n=input().split(" ")
A=int(n[0])
B=int(n[1])
T=int(n[2])
 
bis=int((T+0.5)/A)*B
print(bis)
def make_divisors(n):
    divisors = []
    for i in range(2, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    divisors.append(n)
    return divisors

def check(N,K):
    if N == K:
        return True
    if N % K ==1:
        return True
    if N<K:
        return False
    
    if N % K ==0:
        return check(N//K,K)
    else:
        return False


def resolve():
    N = int(input())
    ys= set(make_divisors(N))
    ys2= set(make_divisors(N-1))
    x =set([i for i in ys|ys2 if check(N,i)])

    print(len(x))


if __name__ == "__main__":
    resolve()


### FIXED CODE ###


def make_divisors(n):
    divisors = []
    for i in range(2, int(n**0.5)+1):
        if n % i == 0:
            divisors.append(i)
            if i != n // i:
                divisors.append(n//i)

    divisors.sort()
    divisors.append(n)
    return divisors

def check(N,K):
    try:
        if N == K:
            return True
        if N % K ==1:
            return True
        if N<K:
            return False
        
        if N % K ==0:
            return check(N//K,K)
        else:
            return False
    except:
        return False

def resolve():
    N = int(input())
    ys= set(make_divisors(N))
    ys2= set([i for i in make_divisors(N-1) if check(N,i)])

    x =set([i for i in ys if check(N,i)])

    print(len(x | ys2))


if __name__ == "__main__":
    resolve()
s=input()
count=0
for i in range(1<<len(s)-1):
    t=""
    for j s:
        if i%2==1:
            t+="+"
        i//=2
    count+=eval(t)
print(count)


### FIXED CODE ###

s=input()
count=0
for i in range(2**(len(s)-1)):
    t=""
    for j in s:
        t+=j
        if i%2==1:
            t+="+"
        i//=2
    count+=eval(t)
print(count)
N=int(input())
A = [int(i) for i in input().split()]
cnt=0
ans=0
B=[]
for i in range(N):
    if A[i]<0:
        cnt+=1
if cnt%2==0:
    ans=sum(abs(A))
    print(ans)
else:
    for i in range(N):
        if A[i]<0:
            B.append(A[i])
    max(B)
    ans=sum(abs(A))
    ans=ans+2*B
    print(ans)

### FIXED CODE ###

N=int(input())
A = [int(i) for i in input().split()]
cnt=0
ans=0
B=[]
C=[]
for i in range(N):
    B.append(abs(A[i]))
for i in range(N):
    if A[i]<0:
        C.append(A[i])
if len(C)%2==0:
    ans=sum(B)
    print(ans)
else:
    sel=min(B)
    print(sum(B)-2*abs(sel))
import math
N = int(input())

ans = 101

if N%2==1:ans=0
else:
    for i in range(int(math.log(N,5))):
        ans += N//(5**(i+1)*2)
print(ans)

### FIXED CODE ###

import math
N = int(input())

ans = 0

if N%2==1:ans=0
else:
    for i in range(int(math.log(N+1,5))):
        ans += N//(5**(i+1)*2)
print(ans)
N=int(input().split())
C=[list(map(int,input().split())) for i in range(N)]
C.sort(key=lambda x:sum(x), reverse=True)
ans=0
for i in range(N):
  if i%2==0:
    ans+=C[i][0]
  else:
    ans-=C[i][1]
print(ans)

### FIXED CODE ###

N=int(input())
C=[list(map(int,input().split())) for i in range(N)]
C.sort(key=lambda x:sum(x), reverse=True)
ans=0
for i in range(N):
  if i%2==0:
    ans+=C[i][0]
  else:
    ans-=C[i][1]
print(ans)
X = int(input())
b = []

for i in range(2, 32):
    p = 2
    while i ** p <= X:
        b.append(i ** p)
        p += 1

print(max(b))

### FIXED CODE ###


X = int(input())
b = [1]

for i in range(2, 32):
    p = 2
    while i ** p <= X:
        b.append(i ** p)
        p += 1

print(max(b))
def resolve():
    n = int(input())
    a = tuple(map(int,input().split()))
    A = collections.Counter(a)
    cnt_0 = 0
    for i in A.values():
        cnt_0 += int(i*(i-1)/2)
    for i in a:
        cnt_1 = A[i]-1
        print(cnt_0-cnt_1)
resolve()

### FIXED CODE ###

import collections
def resolve():
    n = int(input())
    a = tuple(map(int,input().split()))
    A = collections.Counter(a)
    cnt_0 = 0
    for i in A.values():
        cnt_0 += int(i*(i-1)/2)
    for i in a:
        cnt_1 = A[i]-1
        print(cnt_0-cnt_1)
resolve()
N = int(input())
H = list(map(int, input().split()))
list = []
a = 0
for i in range(N-1):
  if H[i] >= H[i+1]:
    a += 1
    list.append(a)
  else:
    list.append(a)
    a = 0
list = sorted(list)
print(list[-1])

### FIXED CODE ###

N = int(input())
H = list(map(int, input().split()))
list = []
a = 0
for i in range(N-1):
  if H[i] >= H[i+1]:
    a += 1
  else:
    list.append(a)
    a = 0
list.append(a)
list = sorted(list)
print(list[-1])