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