Skip to main content

~/algor $ cat contests/round-5/B

B. Sum of matrix elements

Problem B ICPC rules 1000 ms 128 MB

An integer matrix of size is given. Compute the sum of all its elements:

The sum of all elements of the matrix

Input

The first line contains two positive integers and . Each of the next lines contains integers .

Output

One integer — the sum of the elements.

Note


Examples

Input #1
2 3
1 2 3
4 5 6
Output #1
21
Input #2
1 1
-7
Output #2
-7

Sign in to submit a solution

Signing up is free and takes a minute.