#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  cin >> n;
  int val;
  long long total = 0;
  int mid = (n + 1) / 2;
  for (int row = 1; row <= n; row++) {
    for (int col = 1; col <= n; col++) {
      cin >> val;
      if ((row == col) || (row + col - 1 == n) || (row == mid) ||
          (col == mid)) {
        total += val;
      }
    }
  }
  cout << total << endl;
  return 0;
}
