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