Diagonals
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
In the square table find the sum of integers at the main and the secondary diagonals.
Input
The first line contains the size of the matrix. The next lines describe a matrix . The elements of the matrix are not greater than by absolute value.
Output
Print the sum of the integers at the main and the secondary diagonals.
Examples
Input #1
Answer #1
Submissions 14K
Acceptance rate 56%