#include <bits/stdc++.h>
using namespace std;
const int MN = 142;
long long a[MN][MN];
int n;
int main() {
  cin >> n;
  long long result = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      cin >> a[i][j];
      if (i == j || i == ((n - 1) / 2) + 1 || j == ((n - 1) / 2) + 1 ||
          i == n - j + 1) {
        result += a[i][j];
      }
    }
  }
  cout << result << endl;
}
