#include <bits/stdc++.h>
using namespace std;
int main(void) {
  int n, i, j;
  int sum = 0;
  int arr[108][108];
  memset(arr, 0, sizeof arr);
  scanf("%d", &n);
  for (i = 0; i < n; i++)
    for (j = 0; j < n; j++) cin >> arr[i][j];
  for (i = (n - 1 >> 1), j = 0; j < n; j++) sum += arr[i][j];
  for (j = (n - 1 >> 1), i = 0; i < n; i++) sum += arr[i][j];
  for (i = 0, j = 0; i < n && j < n;) {
    sum += arr[i][j];
    i++;
    j++;
  }
  for (i = 0, j = n - 1; i < n && j >= 0;) {
    sum += arr[i][j];
    i++;
    j--;
  }
  sum = sum - 3 * arr[(n - 1) / 2][(n - 1) / 2];
  printf("%d\n", sum);
  return 0;
}
