Harryxun/stf_run huggingface dataset:
val = input()
if val in 'abcdefghijklmnopqrstuvwxyz':
  ans = a
else
  ans = A
  
print(ans)

### FIXED CODE ###

val = input()
if val in 'abcdefghijklmnopqrstuvwxyz':
  ans = 'a'
else:
  ans = 'A'
  
print(ans)
n = int(input())
c= list(map(int, input().split())) 

n_pos = 0
max_c = 0
for i in c:
  if (i>=max_c):
  	n_pos += 1
    max_c = i
  else:
    pass
print(n_pos)

### FIXED CODE ###

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

n_pos = 0
max_c = 0
for i in c:
    if i>=max_c:
        n_pos += 1
        max_c = i
    else:
        pass
print(n_pos)
import sys

def main():
	args = sys.argv

	if args[1] == args[2] and args[2] == args[3]:
  		print("Yes")
	else:
  		print("No")

if __name__ == '__main__':
	main()

### FIXED CODE ###

import sys

def main():
	A,B,C = input().split()

	if A == B and B == C:
  		print("Yes")
	else:
  		print("No")

if __name__ == '__main__':
	main()
while True:
    x = list(map(int, input().split()))
    if x == y == 0:
        break
    print(min(x), max(x))

### FIXED CODE ###

while True:
    x = list(map(int, input().split()))
    if x[0] == x[1] == 0:
        break
    print(min(x), max(x))
N, M, *X = map(int, open('0').read().split())
A = []
for a in zip(*[iter(X)]*M):
  A.append(a)
log = set(range(1,M+1))
ans = N
while log:
  dic = {}
  for i in range(N):
    for j in range(M):
      if A[i][j] in log:
        dic[A[i][j]] = dic.get(A[i][j],0)+1
        break
  ans = min(ans,max(dic.values()))
  c = max(dic.keys(),key=lambda x:dic[x])
  log.remove(c)
print(ans)

### FIXED CODE ###

N, M, *X = map(int, open(0).read().split())
A = []
for a in zip(*[iter(X)]*M):
  A.append(a)
log = set(range(1,M+1))
ans = []
while log:
  dic = {}
  for i in range(N):
    for j in range(M):
      if A[i][j] in log:
        dic[A[i][j]] = dic.get(A[i][j],0)+1
        break
  ans.append(max(dic.values()))
  c = max(dic.keys(),key=lambda x:dic[x])
  log.remove(c)
print(min(ans))
s = input()

a = list('abcdefghijklmnopqrstuvwxyz')

if s == "zyxwvutsrqponmlkjihgfedcba":
    print(-1)
elif len(s) < 26:
    for x in a:
        if s.count(x) == 0:
            print(s + x)
            break
else:
    for i in range(26):
        if a[i] != s[i]:
            ans = s[:i-1] + chr(ord(s[i-1])+1)
            break
    print(ans)

### FIXED CODE ###

s = input()

a = list('abcdefghijklmnopqrstuvwxyz')

if s == "zyxwvutsrqponmlkjihgfedcba":
    print(-1)
elif len(s) < 26:
    for x in a:
        if s.count(x) == 0:
            print(s + x)
            break
else:
    end = False
    for i in range(25)[::-1]:
        if end:
            break
        for j in range(i+1,26)[::-1]:
            if s[i] < s[j]:
                print(s[:i]+s[j])
                end = True
                break
import sympy

n, p = map(int, input().split())
a = sympy.factorint(p)
ans = 1
for i, j in a.items():
    if j >= n:
        ans *= i
print(ans)


### FIXED CODE ###

def usage():
    c, n = map(int, input().split())
    if c == 1:
        print(n)
        return 0
    ans = 1
    fct = factorize(n)
    for i in range(len(fct)):
        if fct[i][1] >= c:
            ans *= fct[i][0] ** (fct[i][1] // c)
    print(ans)


def factorize(n):
    fct = []
    b, e = 2, 0
    while b * b <= n:
        while n % b == 0:
            n = n // b
            e = e + 1
        if e > 0:
            fct.append((b, e))
        b, e = b + 1, 0
    if n > 1:
        fct.append((n, 1))
    return fct


if __name__ == '__main__':
    usage()
XY=list(map(int,input().split()))

x=max(XY)
y=min(XY)
x_dy=x%y

ans=0

if x==y:
    ans=x

for d in range(1,(y+1)//2):
    if y%d==0 and x_dy%d==0:
        ans=d

print(and)

### FIXED CODE ###

def euclidean_alg(x,y):
    while y:
        x,y=y,x%y
    return x

XY=list(map(int,input().split()))
x=max(XY)
y=min(XY)

print(euclidean_alg(x,y))
while True:
 h,w=map(int,input().split())
 if h==0:break
 print('#'*w)
 for _ in range(h-2):print('#'+'.'*(w-2)+'#'))
 print('#'*w)
 print()

### FIXED CODE ###

while 1:
 h,w=map(int,input().split())
 if h==0:break
 print(('#'*w)+'\n'+('#'+'.'*(w-2)+'#\n')*(h-2)+('#'*w)+'\n')
N = int(input())

if N%2 == 0:
    print(0.5000)
else:
    print(((N-1)//(2*N))

### FIXED CODE ###

N = int(input())

if N%2 == 0:
    print(1/2)
else:
    print(((N-1)//2+1)/N)
N = int(input())
S_dict = {}
for i in range(N):
    s = input()
    if s not in S_dict:
        S_dict[s] = 1
    else:
        S_dict[s] += 1
        
max_poll = max(S_dict.values())
ans_list = []
for key, poll in S_dict.items():
    if poll == max_poll:
        ans_list.append(key)

for ans in sorted(ans_list):
    print(ans)

### FIXED CODE ###

A, B = map(int, input().split())
ans = A + B
if ans < 10:
    print(ans)
else:
    print("error")
from IPython import embed

S_prime = input()
T = input()
replaced = 'UNRESTORABLE'
matched = True

for i in range(len(S_prime) - len(T) + 1):
    for k in range(len(T)):
        if S_prime[i + k] != T[k] and S_prime[i + k] != '?':
            matched = False
            break
        matched = True
    if matched:
        print(S_prime[0:i])
        replaced = S_prime[0:i] + T + S_prime[i + len(T):]
        break

print(replaced.replace('?', 'a'))


### FIXED CODE ###

S_prime = input()
T = input()
ans = 'z'
matched = False

if len(S_prime) < len(T):
    print('UNRESTORABLE')
    exit()

for i in range(len(S_prime) - len(T) + 1):
    for k in range(len(T)):
        if S_prime[i + k] != T[k] and S_prime[i + k] != '?':
            break

    if k == len(T) - 1 and (S_prime[i + k] == T[k] or S_prime[i + k] == '?'):
        tmp = (S_prime[0:i] + T + S_prime[i + len(T):]).replace('?', 'a')
        if ans > tmp:
            ans = tmp
        matched = True

if matched:
    print(ans)
else:
    print('UNRESTORABLE')
A1 = int(input('Input A1:'))
A2 = int(input('Input A2:'))
A3 = int(input('Input A3:'))
if (A1+A2+A3) >= 22:
    print('bust')
else:
    print('win')

### FIXED CODE ###

a = [int(x) for x in input().split(" ")]
print("bust") if sum(a) >= 22 else print("win")
n=int(input())
a=[int(z) for z in input().split()]
x=1
for i in a:
    x*=i
    if x>10**18:
        print("-1")
        break
print(x)

### FIXED CODE ###

a,b=map(int,input().split())
print(a*b)
a=int(input())
b= a // 500
bc= a % 500
abc = bc // 5
happy= b * 1000 + abc * 5
print(happy)

### FIXED CODE ###

inputs = str(input())
lists = []
lists.append(inputs)
if inputs[2] == inputs[3] and inputs[4] == inputs[5]:
      print('Yes')
else:
      print('No')
from collections import deque
from sys import stdin


def main():
    height, width = map(int, stdin.readline().split())
    q = deque([])
    grid = [stdin.readline() for _ in range(height)]
    distance = [[-1 for _ in range(width)] for _ in range(height)]
    for i in range(height):
        for j in range(width):
            if grid[i][j] == "#":
                q.append((i, j))
                distance[i][j] = 0
    answer = 0
    delta = ((0, 1), (1, 0), (0, -1), (-1, 0))
    while q:
        y, x = q.popleft()
        answer = distance[y][x]
        for dy, dx in delta:
            new_y = y + dy
            new_x = x + dx
            if 0 <= new_y < height and 0 <= new_x < width and grid[new_y][new_x] == ".":
                distance[new_y][new_x] = answer + 1
                grid[new_y][new_x] = "#"
                q.append((new_y, new_x))
    print(answer)


if __name__ == '__main__':
    main()



### FIXED CODE ###

from collections import deque
from sys import stdin


def main():
    height, width = map(int, stdin.readline().split())
    q = deque([])
    grid = [stdin.readline() for _ in range(height)]
    distance = [[-1 for _ in range(width)] for _ in range(height)]
    for i in range(height):
        for j in range(width):
            if grid[i][j] == "#":
                q.append((i, j))
                distance[i][j] = 0
    answer = 0
    delta = ((0, 1), (1, 0), (0, -1), (-1, 0))
    while q:
        y, x = q.popleft()
        answer = distance[y][x]
        for dy, dx in delta:
            new_y = y + dy
            new_x = x + dx
            if 0 <= new_y < height and 0 <= new_x < width and distance[new_y][new_x] < 0:
                distance[new_y][new_x] = answer + 1
                q.append((new_y, new_x))
    print(answer)


if __name__ == '__main__':
    main()
def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]

n,m,x=n1()
ca=n3(n)
ca
ans=9999999999

import itertools
book=list(itertools.product([0,1], repeat=n))
price=[]
for line in book:
    p=0
    for i in range(n):
        if line[i]==1:
            p+=ca[i][0]
            
    price.append(p)
for i in range(len(book)):
    t=book[i]
    s=[0]*m
    for j in t:
        if t[j]==1:
            s=[s[k]+ca[j][k+1] for k in range(m)]
    if len([y for y in s if y>=x])==m:
        ans=min(ans,price[i])
if ans==9999999999:
    print(-1)
else:
    print(ans)

### FIXED CODE ###

def n0():return int(input())
def n1():return [int(x) for x in input().split()]
def n2(n):return [int(input()) for _ in range(n)]
def n3(n):return [[int(x) for x in input().split()] for _ in range(n)]

n,m,x=n1()
ca=n3(n)
ca

import itertools
book=list(itertools.product([0,1], repeat=n))
price=[]
for line in book:
    p=0
    for i in range(n):
        if line[i]==1:
            p+=ca[i][0]
            
    price.append(p)
A=[[book[i],price[i]] for i in range(len(book))]
A.sort(key=lambda x:x[1])

for line in A:
    t=line[0]
    s=[0]*m
    for i in range(n):
        if t[i]==1:
            s=[s[j]+ca[i][j+1] for j in range(m)]
    if len([i for i in s if i>=x])==m:
        print(line[1])
        break
else:
    print(-1)
import heapq
n, m = map(int, input().split())
ab = [[] for _ in range(m+1)]
for _ in range(n):
    a, b = map(int, input().split())
    ab[a-1].append(-b)
heap = []
ans = 0
for i in range(m):
    for j in ab[i]:
        heapq.heappush(heap, j)
    if heap:
        res = heapq.heappop(heap)
        ans += -res
print(ans)

### FIXED CODE ###

import heapq
n, m = map(int, input().split())
ab = [[] for _ in range(m)]
for _ in range(n):
    a, b = map(int, input().split())
    if m >= a:
        ab[a-1].append(-b)
heap = []
ans = 0
for i in range(m):
    for j in ab[i]:
        heapq.heappush(heap, j)
    if heap:
        res = heapq.heappop(heap)
        ans += -res
print(ans)
N = int(input())
A = (int(x) for x in input().split())
sum  = 1
for i in A:
    sum = sum * i
    if(i == 0):
        print(0)
        break
    if(sum > (10**18)):
        print(-1)
        break
    elif(len(A) == N)
        print(sum)
        break



### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
sum  = 1
flag = 0
for i in A:
    if(i == 0):
        print(0)
        flag=2
        break
if(flag==0):
    for i in A:
        sum = sum * i
        if(sum > 10**18):
            flag=1
            break
if(flag==0):
    print(sum)
elif(flag==1):
    print(-1)
A, B = map(int, input().split())
 
if B % A == 0：
    print(A + B)
else:
    print(B - A)

### FIXED CODE ###

A, B = map(int, input().split())
 
if B % A == 0:
    print(A + B)
else:
    print(B - A)
probA():
    N, X, T = map(int, input().split())

    t = 0
    while N > 0:
        N //= X
        t += T
    print(t)


def main():
    probA()


if __name__ == '__main__':
    main()


### FIXED CODE ###

def probA():
    N, X, T = map(int, input().split())

    t = 0
    while N > 0:
        N -= X
        t += T
    print(t)


def main():
    probA()


if __name__ == '__main__':
    main()
N, M = map(int, input().split())
R = list()
for i in range(N):
  R.append(0)
for i in range(M):
  c1, c2 = map(int, input().split())
  R[c1] += 1
  R[c2] += 1
for i in range(N):
  print(R[i])
  


### FIXED CODE ###

N, M = map(int, input().split())
R = list()
for i in range(N):
  R.append(0)
for i in range(M):
  c1, c2 = map(int, input().split())
  R[c1-1] += 1
  R[c2-1] += 1
for i in range(N):
  print(R[i])
import numpy as np
import itertools
N, M, X = map(int, input().split())
kumi = []
pat = list(range(N))
for _ in range(N):
    kumi.append(list(map(int, input().split())))
ans0 = 10 ** 5 * 12 + 1
ans = 10 ** 5 * 12 + 1
#print(kumi)
test = []
for i in range(N):
    for i2 in itertools.combinations(kumi,i+1):
        arr_i2 = np.array(i2)
        arr_i2_sum = arr_i2.sum(axis = 0)
        if np.all(arr_i2_sum[1:] >= X):
            if ans > arr_i2_sum[0]:
                ans = arr_i2_sum[0]
if ans == ans0:
    print(-1)
else:
    print(ans)import numpy as np
import itertools
N, M, X = map(int, input().split())
kumi = []
pat = list(range(N))
for _ in range(N):
    kumi.append(list(map(int, input().split())))
ans0 = 10 ** 5 * 12 + 1
ans = 10 ** 5 * 12 + 1
#print(kumi)
test = []
for i in range(N):
    for i2 in itertools.combinations(kumi,i+1):
        arr_i2 = np.array(i2)
        arr_i2_sum = arr_i2.sum(axis = 0)
        if np.all(arr_i2_sum[1:] >= X):
            if ans > arr_i2_sum[0]:
                ans = arr_i2_sum[0]
if ans == ans0:
    print(-1)
else:
    print(ans)

### FIXED CODE ###

import numpy as np
import itertools
N, M, X = map(int, input().split())
kumi = []
pat = list(range(N))
for _ in range(N):
    kumi.append(list(map(int, input().split())))
ans = 10 ** 5 * 12
kai = False
test = []
for i in range(N):
    for i2 in itertools.combinations(kumi,i+1):
        arr_i2 = np.array(i2)
        arr_i2_sum = arr_i2.sum(axis = 0)
        if np.all(arr_i2_sum[1:] >= X):
            if ans >= arr_i2_sum[0]:
                ans = arr_i2_sum[0]
                kai = True
if kai:
    print(ans)
else:
    print(-1)
import sys
import numpy as np
import random
from decimal import Decimal
import itertools
import re
import bisect
from collections import deque, Counter
from functools import lru_cache

sys.setrecursionlimit(10**9)
INF = 10**13
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
def SERIES(n): return np.fromstring(sys.stdin.buffer.read(), dtype=np.int32, sep=' ')
def GRID(h,w): return np.fromstring(sys.stdin.buffer.read(), dtype=np.int32, sep=' ').reshape(h,-1)[:,:w]
def GRIDfromString(h,w): return np.frombuffer(sys.stdin.buffer.read(), 'S1').reshape(h,-1)[:,:w]
MOD = 1000000007

def main():
	n = I()
	A = np.array(LI())
	A.sort()
	prime_list = set()
	a_max = A[-1]
	dp = [1]*a_max
	if A[0] != A[1]:
		a = A[0]
		prime_list.add(a)
		i = 2
		while a*i <= a_max:
			dp[a*i-1] = 0
			i += 1
	dp[A[0]-1] = 0
	for a in A[1:]:
		if dp[a-1] == 1:
			dp[a-1] = 0
			prime_list.add(a)
			i = 2
			while a*i <= a_max:
				dp[a*i-1] = 0
				i += 1
	print(len(prime_list))






if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
import numpy as np
import random
from decimal import Decimal
import itertools
import re
import bisect
from collections import deque, Counter
from functools import lru_cache

sys.setrecursionlimit(10**9)
INF = 10**13
def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
def SERIES(n): return np.fromstring(sys.stdin.buffer.read(), dtype=np.int32, sep=' ')
def GRID(h,w): return np.fromstring(sys.stdin.buffer.read(), dtype=np.int32, sep=' ').reshape(h,-1)[:,:w]
def GRIDfromString(h,w): return np.frombuffer(sys.stdin.buffer.read(), 'S1').reshape(h,-1)[:,:w]
MOD = 1000000007

def main():
	n = I()
	A = np.array(LI())
	A.sort()
	count = 0
	a_max = A[-1]
	dp = [1]*a_max
	for a in A:
		point = dp[a-1]
		if point == 1:
			dp[a-1] = 2
			count += 1
			for ai in range(a*2,a_max+1,a):
				dp[ai-1] = 0
		elif point == 2:
			count -= 1
			dp[a-1] = 0
	print(count)






if __name__ == '__main__':
    main()
import sys
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt, ceil, floor
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
INF = float("inf")
sys.setrecursionlimit(10**7)

# 4近傍（右, 下, 左, 上）
dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]


def inside(y: int, x: int, H: int, W: int) -> bool: return 0 <= y < H and 0 <= x < W


def main():
    N = int(input())
    F = [[0] * 10 for _ in range(N)]
    for i in range(N):
        s = input().split()
        for j in range(10):
            F[i][j] = int(s[j])
    P = [[0] * 10 for _ in range(N)]
    for i in range(N):
        s = input().split()
        for j in range(10):
            P[i][j] = int(s[j])

    ans = -INF
    # 2 ^ nの組み合わせの全列挙
    for b in range(1, 2 ** 10):
        o = [0] * 10
        for i in range(10):
            if b & 1 << i:
                o[i] = 1

        total = 0
        for i in range(N):
            c = 0
            for j in range(10):
                if o[j] == 1 and F[i][j] == 1:
                    c += 1
            total += P[i][c]
        ans = max(ans, total)
    print(ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt, ceil, floor
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
INF = float("inf")
sys.setrecursionlimit(10**7)

# 4近傍（右, 下, 左, 上）
dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]


def inside(y: int, x: int, H: int, W: int) -> bool: return 0 <= y < H and 0 <= x < W


def main():
    N = int(input())
    F = [[0] * 10 for _ in range(N)]
    for i in range(N):
        s = input().split()
        for j in range(10):
            F[i][j] = int(s[j])
    P = [[0] * 11 for _ in range(N)]
    for i in range(N):
        s = input().split()
        for j in range(11):
            P[i][j] = int(s[j])

    ans = -INF
    # 2 ^ nの組み合わせの全列挙
    for b in range(1, 2 ** 10):
        o = [0] * 10
        for i in range(10):
            if b & 1 << i:
                o[i] = 1

        total = 0
        for i in range(N):
            c = 0
            for j in range(10):
                if o[j] == 1 and F[i][j] == 1:
                    c += 1
            total += P[i][c]
        ans = max(ans, total)
    print(ans)


if __name__ == '__main__':
    main()
N,M = map(int,input().split())
a = [int(input()) for _ in range(M)]

def fib(n):  
    if (n==0 or n==1):return 1
    if n in a:
      return 0
    elif fib(n-1) + fib(n-2) < 1000000007:
      return (fib(n-1) + fib(n-2))
    else:
      return (fib(n-1) + fib(n-2)) % 1000000007

print(fib(N))

### FIXED CODE ###

N,M = map(int,input().split())
a = [int(input()) for _ in range(M)]
a.sort(reverse=True)

if 1 in a:
  a.pop()
  fibs = [1,0]
else:
  fibs = [1,1]

for i in range(2,N+1):
  if len(a) > 0 and i == a[-1]:
    a.pop()
    fibs[0] = fibs[1]
    fibs[1] = 0
  else:
    next = fibs[1] + fibs[0]
    if next > 1000000007:
      next -= 1000000007
    fibs[0] = fibs[1]
    fibs[1] = next

print(fibs[-1])
MD = [map(int, input().split()) for _ in range(N)]
M, D = [list(i) for i in zip(*MD)]

if D[1] == 1:
    print(1)
else:
    print(0)


### FIXED CODE ###

MD = [map(int, input().split()) for _ in range(2)]
M, D = [list(i) for i in zip(*MD)]

if D[1] == 1:
    print(1)
else:
    print(0)
if 7/0>1:print(1)

### FIXED CODE ###

A,B,K=map(int,input().split())
for i in range(100):
  if A%(100-i)==0 and B%(100-i)==0:
    K-=1
    if K==0:
      print(100-i)
      break
import numpy as np
n,k = map(int, input().split())
h = [int(i) for i in input().split()]
dp = [(10**4)*(10**5)]*n
dp[0]=0
loop = min(k+1,n-i)
for i in range(n-1):
     for j in range(1,loop):
#            if i+j>n-1: break
            dp[i+j] = min(dp[i+j],dp[i]+np.abs(h[i]-h[i+j]))
print(dp[n-1]) 

### FIXED CODE ###

n,k = map(int, input().split())
h = [int(i) for i in input().split()]
dp = [(10**4)*(10**5)]*n
dp[0]=0
for i in range(n-1):
    loop = min(k+1,n-i)
    for j in range(1,loop):
        dp[i+j] = min(dp[i+j],dp[i]+abs(h[i]-h[i+j])) 
print(dp[n-1])
def multiple_sum(x, n):
    # x + 2x + ... + kx(<= n)
    k = n // x
    return x * (k + 1) * k // 2


def solve(N: int):
    ans = 0
    for i in range(1, N + 1):
        ans += multiple_sum(i, N)
    print(ans)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)


if __name__ == "__main__":
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys
def multiple_sum(x, n):
    # x + 2x + ... + kx(<= n)
    k = n // x
    return x * (k + 1) * k // 2


def solve(N: int):
    ans = 0
    for i in range(1, N + 1):
        ans += multiple_sum(i, N)
    print(ans)
    return


# Generated by 1.1.7.1 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word

    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)


if __name__ == "__main__":
    main()
# coding: utf-8
# Your code here!
N=int(input())

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

dp=[[-10**9 for i in range(N)] for j in range(3)]
dp[0][0]=A[0]
dp[1][1]=A[1]
dp[2][2]=A[2]

for n in range(3):
    for index in range(N):
        if dp[n][index]!=-1:
            if n!=2 and index+3<N:
                dp[n+1][index+3]=max(dp[n+1][index+3],dp[n][index]+A[index+3])
            if n==0 and index+4<N:
                dp[n+2][index+4]=max(dp[n+2][index+4],dp[n][index]+A[index+4])
            if index+2<N:
                dp[n][index+2]=max(dp[n][index+2],dp[n][index]+A[index+2])

a=(dp[0][-1])
b=(dp[1][-1])
c=(dp[2][-1])

print(max(a,b,c))


        

### FIXED CODE ###

# coding: utf-8
# Your code here!
N=int(input())

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

if N==2:
    print(max(0,A[0],A[1]))
    exit()
if N==3:
    print(max(0,A[0],A[1],A[2]))
    exit()

dp=[[-10**18 for i in range(N)] for j in range(3)]
dp[0][0]=A[0]
dp[1][1]=A[1]
dp[2][2]=A[2]

for n in range(3):
    for index in range(N):
        if dp[n][index]!=-1:
            if n!=2 and index+3<N:
                dp[n+1][index+3]=max(dp[n+1][index+3],dp[n][index]+A[index+3])
            if n==0 and index+4<N:
                dp[n+2][index+4]=max(dp[n+2][index+4],dp[n][index]+A[index+4])
            if index+2<N:
                dp[n][index+2]=max(dp[n][index+2],dp[n][index]+A[index+2])

a=(dp[0][-1])
b=(dp[1][-1])
c=(dp[2][-1])

print(max(a,b,c))
a,b,c,x,y=map(int, input().split())
cnta=0
cntb=0
cntc=0
if a+b>2*c:
  cntc=min(x,y) * 2
else:
  cnta=min(x,y)
  cntb=min(x,y)

if x>y:
  if a>2*c:
    cntc+=2*(x-y)
  else:
    cnta+=x-y
else:
  if b>2*c:
    cntc+=2*(y-x)
  else:
    cntb+=y-x

ptint(cnta*a+cntb*b+cntc*c)



### FIXED CODE ###

A,B,C,X,Y=map(int, input().split())
cnta=0
cntb=0
cntc=0
if X>Y:
  if A+B>2*C:
    cntc+=2*Y
  else:
    cnta+=Y
    cntb+=Y
  if A>2*C:
    cntc+=2*(X-Y)
  else:
    cnta+=(X-Y)
else:
  if A+B>2*C:
    cntc+=2*X
  else:
    cnta+=X
    cntb+=X
  if B>2*C:
    cntc+=2*(Y-X)
  else:
    cntb+=(Y-X)

print(cnta*A+cntb*B+cntc*C)