#include <bits/stdc++.h>
using namespace std;
const int maxn = 121;
int arr[maxn][maxn];
int main() {
  int n;
  cin >> n;
  int res = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      cin >> arr[i][j];
      if (i + j == n + 1 || i == j || n - i == (n - 1) / 2 ||
          n - j == (n - 1) / 2)
        res += arr[i][j];
    }
  }
  cout << res << endl;
  return 0;
}
