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