#include <bits/stdc++.h>
using namespace std;
int n, i, j, x, s;
int main() {
  cin >> n;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= n; j++) {
      cin >> x;
      if (i == j)
        s = s + x;
      else if (i + j == n + 1)
        s += x;
      else if (i == (n + 1) / 2)
        s += x;
      else if (j == (n + 1) / 2)
        s += x;
    }
  cout << s;
}
