#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, x, res = 0;
  cin >> n;
  for (int i = 0, k = n - 1; i < n; ++i, --k) {
    for (int j = 0, l = n - 1; j < n; ++j, --l) {
      cin >> x;
      if (i == j || k == j || k == i || j == l) res += x;
    }
  }
  cout << res << endl;
  return 0;
}
