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