package homework;
import java.util.Scanner;
public class practice4 {
public static void main(String args[]){
Scanner ina = new Scanner(System.in);
int[][] a;
int sum=0, n = ina.nextInt();
a = new int[n][n];
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
a[i][j] = ina.nextInt();
}
}
for(int i=0;i<n;i++){
sum = sum + a[i][i]+a[i][n-i-1];
}
if(n%2!=0){
sum=sum-a[(n-1)/2][(n-1)/2];
}
System.out.print(sum);
}
}