CodeLab Academy 📞 9936 6696
← List Python · Level 7: Lists Code · 70 points ← #681 #683 →

#682. Largest sum of a window of 3

Look at the sums of every 3 elements in a row and find the largest one (n ≥ 3). ### Input The first line has n, the second line has n integers separated by spaces. ### Output A number.

Examples

Input
3
7 -5 3
Output
5
Input
5
-20 5 20 -6 8
Output
22

💡 You can solve it with Python, JavaScript or blocks. Read the input line by line with input(). Don't print a question (like input("Number: ")). Print exactly what the output asks for, nothing more.

🔒 You can solve the first 3 problems without an account. Sign up for free to solve this one!