Again the sum (of functions)#8764

Again the sum (of functions)

1 second
64 megabytes
Very easy

Given a field of size n \times m composed of square cells. Rows are numbered from to (from top to bottom), and columns from to (from left to right). Each cell contains an integer.

Your task is to find the sum of all numbers in the field.

Input

The first line contains three integers , , and (1 \le n, m \le 100, 1 \le g \le 2) — the dimensions of the field and the block number.

Each of the following lines contains integers a_{i1}, a_{i2}, \ldots, a_{im} (1 \le a_{ij} \le 10^9) — the numbers in the field.

Interaction

You need to implement the following function:

integer solve(integer n, integer m, integer g)

  • and — the dimensions of the field;

  • — the block number;

  • The function should return a single integer — the sum of all numbers in the field.

To query cell values, you should use the function:

integer getValue(integer x, integer y)

  • (1 \le x \le n) — row number;

  • (1 \le y \le m) — column number;

  • The function returns the value written in cell .

Output

Output a single integer — the sum of all numbers in the field.

Examples

Example 1

Loading
Loading

Scoring

  1. ( points): n \le 1;

  2. ( points): no additional constraints.