Consider a square chess board with rows and columns, where every square contains between 0 and 9 coins. Write a program such that, given a chess board, computes the total number of coins on its two diagonals.
Input begins with the size
of the board. Follow
lines, each one with
characters between ‘0’ and ‘9’.
Print the total number of coins on the two diagonals of the board.
Input
4 2389 3402 3956 2018
Output
39
Input
3 975 123 450
Output
20