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