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