Competitions

# Two dimensional arrays

# Diagonals

In the square table **n** × **n** find the sum of integers at the main and at the secondary diagonal.

#### Input

First given the size **n** (**1** ≤ **n** ≤ **500**), and then a matrix **n** × **n**. The elements of the matrix are not greater than `10`

by absolute value.^{5}

To understand how each diagonal is called, look at the second sample.

#### Output

Print the sum of integers at main and secondary diagonal.

Input example #1

1 451

Output example #1

451 451

Input example #2

4 134 475 30 424 303 151 419 235 248 166 90 42 318 237 184 36

Output example #2

411 1327