#include <bits/stdc++.h>
using namespace std;
typedef priority_queue<pair<int, int>, vector<pair<int, int>>,
                       greater<pair<int, int>>>
    rpqpi;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, a, ans = 0;
  cin >> n;
  vector<vector<int>> b(n, vector<int>(n, 0));
  for (int i = 0; i < n; ++i) {
    b[i][i] = 1;
    b[i][n / 2] = 1;
    b[n / 2][i] = 1;
    b[i][n - 1 - i] = 1;
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < n; ++j) {
      cin >> a;
      ans += a * b[i][j];
    }
  }
  cout << ans << '\n';
  return 0;
}
