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