#include <bits/stdc++.h>
using namespace std;
int n;
int ans, s;
bool used[105][105];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    for (int j = 1; j <= n; j++) {
      scanf("%d", &s);
      if (j == n / 2 + 1 && !used[i][j]) {
        ans += s;
        used[i][j] = 1;
      }
      if (i == n / 2 + 1 && !used[i][j]) {
        ans += s;
        used[i][j] = 1;
      }
      if (i == j && !used[i][j]) {
        ans += s;
        used[i][j] = 1;
      }
      if (i + j == n + 1 && !used[i][j]) {
        ans += s;
        used[i][j] = 1;
      }
    }
  }
  cout << ans;
  return 0;
}
