#K8026. Maximum Coin Collection

    ID: 35491 Type: Default 1000ms 256MiB

Maximum Coin Collection

Maximum Coin Collection

You are given a grid with n rows and m columns where each cell contains a non-negative integer representing the number of coins at that cell. Your task is to determine the maximum number of coins that can be collected by simply summing up all the values in the grid.

The answer is given by the formula:

S=i=1nj=1mai,jS = \sum_{i=1}^{n}\sum_{j=1}^{m} a_{i,j}

Input is provided via standard input (stdin) and output should be printed on standard output (stdout).

inputFormat

The first line of input contains two integers n and m (the number of rows and columns respectively).

This is followed by n lines, each containing m space-separated integers representing the grid values.

outputFormat

Output a single integer which is the sum of all numbers in the grid.

## sample
3 3
1 0 0
0 2 0
3 0 1
7