#TRAVERSE. Traverse through the board
Traverse through the board
An n × n game board is filled with integers, one positive integer per square. The objective is to travel along any legitimate path from the upper left corner to the lower right corner of the board.
Rules:
- The number in any one square describes how far a step away from that location must be.
- If the step size moves out of the game board, then that step is not allowed.
- All steps must be either to the right or towards the bottom.
Note that a 0 is a dead end which prevents any further progress.
Consider the 4 × 4 board shown in Figure 1, where the solid circle identifies the start position and the dashed circle identifies the target.

Input
The first line contains the value of n followed by a n × n matrix depicting the board configuration.
Output
The output consists of a single integer, which is the number of paths from the upper left corner to the lower right corner.
Example
Input: 4 2331 1213 1231 3110</p>Output: 3
Input: 4 3332 1213 1232 2120 Output: 0
Input: 5 11101 01111 11111 11101 11101 Output: 7