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