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