#include <bits/stdc++.h>
using namespace std;
int a[123][123];
int main() {
  int n, sum = 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++) {
    sum += a[i][i];
    sum += a[i][n - i + 1];
    sum += a[i][n / 2 + 1];
    sum += a[n / 2 + 1][i];
  }
  cout << sum - 3 * a[n / 2 + 1][n / 2 + 1] << endl;
  return 0;
}
