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