#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a[200][200], i, j, sum;
  while (scanf("%d", &n) != EOF) {
    for (i = 0; i < n; ++i)
      for (j = 0; j < n; ++j) scanf("%d", &a[i][j]);
    sum = 0;
    for (i = 0; i < n; ++i)
      for (j = 0; j < n; ++j)
        if (i == j || i + j == n - 1) sum += a[i][j];
    for (i = 0; i < n; ++i) {
      if (i + (n - 1) / 2 != n - 1 && i != (n - 1) / 2)
        sum += a[(n - 1) / 2][i];
    }
    for (i = 0; i < n; ++i) {
      if (i + (n - 1) / 2 != n - 1 && i != (n - 1) / 2)
        sum += a[i][(n - 1) / 2];
    }
    printf("%d\n", sum);
  }
  return 0;
}
