#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, c = 0, a[105][105];
  cin >> n;
  int k = (n - 1) / 2;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> a[i][j];
      if (i == j) c += a[i][j];
      if (i + j == n - 1 && (i != k && j != k)) c += a[i][j];
      if (i == k && j != k) c += a[i][j];
      if (j == k && i != k) c += a[i][j];
    }
  }
  cout << c;
  return 0;
}
