#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, half, value;
  cin >> n;
  half = n / 2;
  int total = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> value;
      if (i == half || j == half || i == j || i + j == n - 1) {
        total += value;
      }
    }
  }
  cout << total << endl;
}
