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