CodeLab Academy 📞 9936 6696
← List Python · Level 8: Nested loops Code · 80 points ← #731 #733 →

#732. Matrix: Sum of all elements

You are given a matrix of integers. **Sum of all elements**. ### Input The first line has n m (the number of rows and columns), each of the next n lines has m integers. ### Output The answer.

Examples

Input
5 5
6 4 0 3 -4
9 -6 9 5 -4
9 1 -5 -2 2
7 -8 3 -2 9
0 4 -4 9 -4
Output
41
Input
4 4
6 7 8 -9
8 -8 -8 -6
8 -4 -2 -9
1 1 -5 -5
Output
-17

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