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