#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-8;
int dblcmp(double d) {
  if (fabs(d) < eps) return 0;
  return d > eps ? 1 : -1;
}
const double PI = 3.1415926535897932384626433832795;
const double pi = acos(-1.0);
int dx[4] = {-1, 0, 1, 0};
int dy[4] = {0, -1, 0, 1};
double ar(double r1, double r2) { return pi * (r2 * r2 - r1 * r1); }
int convert(char c) {
  if (c == '0') return 0;
  return (c - '1' + 1);
}
int matr[103][103] = {0};
int main(int argc, char* argv[]) {
  int n, sum = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      if (i == n / 2 || j == n / 2 || i == j) matr[i][j]++;
      if ((i + j) == (n - 1)) matr[i][j]++;
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      int t;
      cin >> t;
      if (matr[i][j] > 0) sum += t;
    }
  }
  cout << sum;
  return 0;
}
