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