1a

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
n=int(input())
a = []
for i in range(n):
a += [int(input())]
maxx=a[0]+a[7]
for i in range(n-6):
for j in range(i+7,n):
if a[i]+a[j]>maxx:
maxx=a[i]+a[j]
print(maxx)