#include <bits/stdc++.h>
int main() {
  int mat[150][150];
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      scanf("%d", &mat[i][j]);
    }
  }
  int cont = 0;
  for (int i = 0; i < n; i++) {
    cont = cont + mat[i][i];
    mat[i][i] = 0;
  }
  int v = (n - 1) / 2;
  int cont1 = 0;
  for (int i = 0; i < n; i++) {
    cont1 = cont1 + mat[v][i];
    mat[v][i] = 0;
  }
  int cont2 = 0;
  for (int i = 0; i < n; i++) {
    cont2 = cont2 + mat[i][v];
    mat[i][v] = 0;
  }
  int cont3 = 0;
  for (int i = 0, j = n - 1; i < n, j >= 0; i++, j--) {
    cont3 = cont3 + mat[i][j];
  }
  int t = cont + cont1 + cont2 + cont3;
  printf("%d", t);
  return 0;
}
