#include <bits/stdc++.h>
using namespace std;
int main() {
  {
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);
  };
  int n, temp;
  cin >> n;
  {
    cerr << "Line " << 20 << ": "
         << "n"
         << "=" << n << '\n';
  };
  int line = n / 2;
  int sum = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> temp;
      if (i == j) {
        sum += temp;
      } else if (n - i - 1 == j) {
        sum += temp;
      } else if (j == line || i == line) {
        sum += temp;
      }
    }
  }
  cout << sum << '\n';
  return 0;
}
