int input for in range int input if st ans if if st st if st ans ans s

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
n = int(input())
a = [0]*7
for i in range(n):
x = int(input())
t = a[i % 7]
a[i % 7] = x
if i == 7:
st = t
ans = t + x
if i > 7:
if t > st:
st = t
if st + x > ans:
ans = st + x
print(ans)