#include <bits/stdc++.h>
using namespace std;
int n, sum = 0;
int a[102 + 1][102 + 1];
int main(int argc, const char* argv[]) {
  cin >> n;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) cin >> a[i][j];
  if (n == 1) {
    sum = a[1][1];
  } else if (n == 3) {
    for (int i = 1; i <= n; i++)
      for (int j = 1; j <= n; j++) sum += a[i][j];
  } else {
    int mid = (n + 1) / 2;
    for (int i = 1; i <= n; i++) {
      sum += a[i][i];
      sum += a[i][n + 1 - i];
      sum += a[i][mid];
      sum += a[mid][i];
    }
    sum -= 3 * a[mid][mid];
  }
  cout << sum << endl;
  return 0;
}
