#include <bits/stdc++.h>
using namespace std;
int mxN = 101;
void solve() {
  int n;
  cin >> n;
  int ans = 0;
  vector<vector<int>> a(n, vector<int>(n));
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> a[i][j];
    }
  }
  for (int i = 0, j = n - 1; i < n; i++) {
    ans += a[i][i];
    a[i][i] = 0;
    ans += a[i][j];
    a[i][j] = 0;
    --j;
  }
  for (int j = 0; j < n; j++) {
    ans += a[n / 2][j];
    a[n / 2][j] = 0;
    ans += a[j][n / 2];
    a[j][n / 2] = 0;
  }
  cout << ans << "\n";
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  solve();
}
