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