#include <bits/stdc++.h>
int n, m, tot;
int arr[110][110];
int main() {
  int i, j, k;
  while (scanf("%d", &n) != EOF) {
    for (i = 1; i <= n; ++i)
      for (j = 1; j <= n; ++j) scanf("%d", &arr[i][j]);
    tot = 0;
    for (i = 1; i <= n; ++i) tot += arr[i][i], arr[i][i] = 0;
    for (i = 1; i <= n; ++i) tot += arr[n - i + 1][i], arr[n - i + 1][i] = 0;
    if (n % 2 == 1)
      for (i = 1; i <= n; ++i) {
        tot += arr[i][n / 2 + 1], arr[i][n / 2 + 1] = 0;
        tot += arr[n / 2 + 1][i], arr[n / 2 + 1][i] = 0;
      }
    else
      for (i = 1; i <= n; ++i) {
        tot += arr[i][n / 2 + 1], arr[i][n / 2 + 1] = 0;
        tot += arr[i][n / 2 + 2], arr[i][n / 2 + 2] = 0;
        tot += arr[n / 2 + 1][i], arr[n / 2 + 1][i] = 0;
        tot += arr[n / 2 + 2][i], arr[n / 2 + 2][i] = 0;
      }
    printf("%d\n", tot);
  }
}
