#include <bits/stdc++.h>
using namespace std;
int mat[150][150];
int aux[150][150];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      scanf("%d", &mat[i][j]);
      aux[i][j] = 0;
    }
  unsigned long long int sum = 0;
  for (int i = 0; i < n; i++) {
    if (!aux[i][i]) {
      sum += mat[i][i];
      aux[i][i] = 1;
    }
    if (!aux[i][n - 1 - i]) {
      sum += mat[i][n - 1 - i];
      aux[i][n - 1 - i] = 1;
    }
    if (!aux[(n - 1) / 2][i]) {
      sum += mat[(n - 1) / 2][i];
      aux[(n - 1) / 2][i] = 1;
    }
    if (!aux[i][(n - 1) / 2]) {
      sum += mat[i][(n - 1) / 2];
      aux[i][(n - 1) / 2] = 1;
    }
  }
  cout << sum << endl;
  return 0;
}
