#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, n, m, sum;
  cin >> n;
  int arr[n][n];
  for (i = 0; i < n; i++)
    for (j = 0; j < n; j++) cin >> arr[i][j];
  m = (n - 1) / 2;
  for (i = 0, sum = 0; i < n; i++)
    for (j = 0; j < n; j++) {
      if (i == j)
        sum += arr[i][j];
      else if (n - i - 1 == j)
        sum += arr[i][j];
      else if (i == m)
        sum += arr[i][j];
      else if (j == m)
        sum += arr[i][j];
    }
  cout << sum << endl;
  return 0;
}
