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

#661. Sums of groups of 2

Split the list into groups of 2 elements in a row (the last group may be smaller). Print the sum of each group. ### Input The first line has n, the second line has n integers separated by spaces. ### Output One line.

Examples

Input
12
10 0 1 1 8 4 4 1 7 6 -7 -4
Output
10 2 12 5 13 -11
Input
9
4 -6 8 1 -10 0 7 6 -4
Output
-2 9 -10 13 -4

💡 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!