#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, sum = 0;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      scanf("%d", &a);
      b = (n + 1) / 2;
      if (i == j || (i + j - 1) == n || b == j || b == i) sum += a;
    }
  }
  cout << sum << endl;
  return 0;
}
