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