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