A harvest cart rolls across a vineyard laid out as a grid of R rows and C columns. Each cell holds an integer yield: positive for ripe vines, negative for rotted patches that cost yield when passed through. The cart starts at the top-left cell (whose yield is always collected) and must reach the bottom-right cell, moving on each step to the cell immediately to the right or immediately below. Every cell the cart enters contributes its yield to the running total.
Determine the maximum total yield the cart can collect.
Input format
Line 1: two integers R and C.
Next R lines: each contains C integers, the yields of that row.
Output format
A single integer: the maximum total yield of a right/down route from the top-left cell to the bottom-right cell (this value may be negative).
Constraints
- 1 <= R <= 100
- 1 <= C <= 100
- -1000 <= each yield <= 1000