#include <bits/stdc++.h>
using namespace std;
void swapll(long long *a, long long *b) {
  long long tmp = *a;
  *a = *b;
  *b = tmp;
}
void swapc(char *a, char *b) {
  char tmp = *a;
  *a = *b;
  *b = tmp;
}
int main() {
  int n;
  cin >> n;
  long long sum = 0;
  int arr[n][n];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> arr[i][j];
      if (i == j || i == (n / 2) || j == (n / 2) || (i + j) == (n - 1)) {
        sum += arr[i][j];
      }
    }
  }
  cout << sum << endl;
  return 0;
}
