#include <bits/stdc++.h>
struct Matrix {
  int value;
  int viewed;
};
int main(void) {
  int countOfElements;
  int countOfGoodElements = 0;
  int i, j;
  int midLine;
  scanf("%d", &countOfElements);
  struct Matrix matrix[countOfElements][countOfElements];
  for (i = 0; i < countOfElements; i++) {
    for (j = 0; j < countOfElements; j++) {
      scanf("%d", &matrix[i][j].value);
      matrix[i][j].viewed = 0;
    }
  }
  for (i = 0; i < countOfElements; i++) {
    if (!matrix[i][i].viewed) {
      countOfGoodElements += matrix[i][i].value;
      matrix[i][i].viewed = 1;
    }
  }
  midLine = (countOfElements - 1) / 2;
  for (i = 0; i < countOfElements; i++) {
    if (!matrix[midLine][i].viewed) {
      countOfGoodElements += matrix[midLine][i].value;
      matrix[midLine][i].viewed = 1;
    }
    if (!matrix[i][midLine].viewed) {
      countOfGoodElements += matrix[i][midLine].value;
      matrix[i][midLine].viewed = 1;
    }
  }
  for (i = 0; i < (countOfElements + 1) / 2; i++) {
    int temp = countOfElements - i - 1;
    if (!matrix[i][temp].viewed) {
      countOfGoodElements += matrix[i][temp].value;
      matrix[i][temp].viewed = 1;
    }
    if (!matrix[temp][i].viewed) {
      countOfGoodElements += matrix[temp][i].value;
      matrix[temp][i].viewed = 1;
    }
  }
  printf("%d", countOfGoodElements);
  return 0;
}
