Given a matrix of size n \times m that contains non-negative integers, not greater than .
The cells are adjacent if their column or row numbers differ by . The path from one cell to another passes only through adjacent cells of the matrix.
Find the path with minimum cost between the upper left and lower right corners of the matrix. The cost of the path equals the sum of matrix elements along the path. It is allowed to move to neighboring cells to the left, right, up, and down.
First line contains the numbers and (1 \leq n, m \leq 10). Then lines are given, each line contains numbers.
Print the cost of minimal path.
Example 1