#include <bits/stdc++.h>
int g[102][102];
int main() {
  int n, t, sum = 0;
  scanf("%d", &n);
  t = n / 2;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < n; ++j) scanf("%d", &g[i][j]);
  for (int i = 0; i < n; ++i)
    sum += g[i][i] + g[i][n - i - 1] + g[t][i] + g[i][t];
  sum -= 3 * g[t][t];
  printf("%d\n", sum);
}
