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