Problems
Diagonals
Diagonals
In the square table n \cdot n find the sum of integers at the main and the secondary diagonals.
Input data
The first line contains the size n~(1 \le n \le 500) of the matrix. The next lines describe a matrix n \cdot n. The elements of the matrix are not greater than 10^5 by absolute value.
Output data
Print the sum of the integers at the main and the secondary diagonals.
Examples
Input example #1
4 1 2 3 4 5 6 7 8 3 2 5 4 8 7 9 3
Output example #1
15 21