In the top-left corner of a rectangular table of size n \times m, there is a turtle. Each cell of the table contains some amount of acid. The turtle can move only right or down; its journey ends in the bottom-right cell of the table.
The first line contains two natural numbers and (1 \le n, m \le 1000) — the dimensions of the table. Each of the next lines contains integers, separated by spaces — the description of the table, where each number denotes the amount of acid in the corresponding cell (in milliliters).
Output the minimum possible damage the turtle can receive.

Пример 1
Пример 2