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