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