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

#681. Sums of groups of 3

Split the list into groups of 3 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
11
-4 -4 6 -3 3 1 5 3 -9 2 -6
Output
-2 1 -1 -4
Input
11
-1 0 4 2 10 8 -7 -5 -2 7 -6
Output
3 20 -14 1

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