#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int sum = 0;
  int ar[102][102];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> ar[i][j];
    }
  }
  int p = (n - 1) / 2;
  for (int i = 0; i < n; i++) {
    sum += ar[p][i];
    for (int j = 0; j < n; j++) {
      if (i == j) {
        sum += ar[i][j];
      }
    }
    sum += ar[i][p];
  }
  for (int i = 0, j = n - 1; i < n, j >= 0; i++, j--) sum += ar[i][j];
  sum = sum - (3 * ar[p][p]);
  cout << sum << endl;
  return 0;
}
