#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n, a[102][102], s = 0;
  cin >> n;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) cin >> a[i][j];
  for (int i = 1; i <= n; i++)
    s += a[i][i] + a[i][n + 1 - i] + a[n / 2 + 1][i] + a[i][n / 2 + 1];
  cout << s - 3 * a[n / 2 + 1][n / 2 + 1] << endl;
  return 0;
}
