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