#include <bits/stdc++.h>
using namespace std;
int a[110][110];
int main() {
  int n, s, i, j;
  scanf("%d", &n);
  for (i = 1; i <= n; i++)
    for (j = 1; j <= n; j++) scanf("%d", &a[i][j]);
  s = 0;
  for (i = 1; i <= n; i++)
    for (j = 1; j <= n; j++) s = s + a[i][j];
  if (n <= 3)
    printf("%d\n", s);
  else {
    for (i = 1; i <= n; i++)
      for (j = 1; j <= n; j++) {
        if (i == j || i + j == n + 1) continue;
        if (n % 2 && (i * 2 == n + 1 || j * 2 == n + 1)) continue;
        s = s - a[i][j];
      }
    printf("%d\n", s);
  }
  return 0;
}
