#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[101][101], s = 0, i, j, k, p;
  cin >> n;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= n; j++) cin >> a[i][j];
  k = n;
  while (k > 0) {
    s += a[k][k];
    k--;
  }
  k = n;
  p = 1;
  while (p <= n && k > 0) {
    if (p != k) s += a[p][k];
    p++;
    k--;
  }
  p = (n - 1) / 2 + 1;
  k = 1;
  while (k <= n) {
    if (k != p) s += a[p][k];
    k++;
  }
  p = (n - 1) / 2 + 1;
  k = 1;
  while (k <= n) {
    if (k != p) s += a[k][p];
    k++;
  }
  cout << s << endl;
  return 0;
}
