#include <bits/stdc++.h>
using namespace std;
const int N = 1e2 + 20;
int n, a[N][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 == j || i + j == n - 1 || i == (n - 1) / 2 || j == (n - 1) / 2) {
        sum += a[i][j];
      }
    }
  }
  cout << sum;
  return 0;
}
