#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s = 0;
  cin >> n;
  int** a;
  a = new int*[n];
  for (int i = 0; i < n; i++) {
    a[i] = new int[n];
  }
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> a[i][j];
      if (i == j)
        s += a[i][j];
      else {
        if (i == (int)(n / 2))
          s += a[i][j];
        else {
          if (j == (int)(n / 2))
            s += a[i][j];
          else {
            if ((i + j) == (n - 1))
              s += a[i][j];
            else
              continue;
          }
        }
      }
    }
  }
  cout << s << endl;
}
