There is a garden of strawberry plants represented by a 2D, square array. Each plant

represents an element in the matrix, i.e., it has a number of straberries. If a plant

doesn't have strawberries it is denoted by 0. If 0 is encountered you cannot travel

through that path.

You can start from any cell along the left border of this ground (i.e., the matrix) and

travel until it finally stops at one cell in the right border, and you can only move to

up/down/right. You can only visit each cell once. Calculate the maximum number of berries

is obtained.

Also there are some special conditions:

- Even in the left border and right border, we can go up and down.
- When we are at the top cell of one column, we can still go up, which

demands us to pay all current strawberries, then we will be

teleported to the bottom cell of this column and vice versa.

Input: user enters dimensions of ground i.e. size of matrix and the matrix itself.

Output: the maximum number of strawberries collected without encountering 0