#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[105][105];
  int s = 0;
  int n;
  cin >> n;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> a[i][j];
      if (i == j || (i + j) == (n - 1) || i == (n / 2) || j == (n / 2)) {
        s += a[i][j];
      }
    }
  }
  cout << s << endl;
  return 0;
}
