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