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