#include <bits/stdc++.h>
int main() {
  using namespace std;
  int n, i, j;
  cin >> n;
  int mas[103][103];
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= n; j++) cin >> mas[i][j];
  }
  int k = 0;
  for (i = 1, j = 1; i <= n; i++, j++) k += mas[i][j];
  for (i = n / 2 + 1, j = 1; j <= n; j++) k += mas[i][j];
  for (i = 1, j = n / 2 + 1; i <= n; i++) k += mas[i][j];
  for (i = 1, j = n; i <= n; i++, j--) k += mas[i][j];
  k = k - 3 * mas[n / 2 + 1][n / 2 + 1];
  cout << k;
}
