#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<vector<int> > v(n, vector<int>(n));
  vector<vector<bool> > good(n, vector<bool>(n));
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      cin >> v[i][j];
    }
  }
  for (int i = 0; i < n; ++i) {
    good[i][i] = true;
    good[i][n - i - 1] = true;
    good[n / 2][i] = true;
    good[i][n / 2] = true;
  }
  int res = 0;
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      if (good[i][j]) {
        res += v[i][j];
      }
    }
  }
  cout << res;
}
