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