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