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