#include <bits/stdc++.h>
using namespace std;
const double PI = acos(-1.0);
const int INF = 1000 * 1000 * 1000 + 7;
const long long LINF = INF * (long long)INF;
const int MAX = 100 + 7;
int A[MAX][MAX];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  for (int i = (0); i < (n); i++) {
    for (int j = (0); j < (n); j++) cin >> A[i][j];
  }
  int ans = 0;
  for (int i = (0); i < (n); i++) {
    for (int j = (0); j < (n); j++) {
      if (i == j || i == n - j - 1 || i == n / 2 || j == n / 2) {
        ans += A[i][j];
      }
    }
  }
  cout << ans << endl;
  return 0;
}
