#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  int s = 0;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      int x;
      scanf("%d", &x);
      if (i == j || i + j == n - 1 || i == n / 2 || j == n / 2) s += x;
    }
  printf("%d\n", s);
  return 0;
}
