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