#include <bits/stdc++.h>
using namespace std;
int mm[110][110];
int main() {
  int n, ss = 0, md;
  scanf("%d", &n);
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) scanf("%d", &mm[i][j]);
  if (n % 2 == 0)
    md = n / 2;
  else
    md = (n / 2) + 1;
  md--;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      if (i == j) ss += mm[i][j];
      if (i + j == n - 1) ss += mm[i][j];
    }
  for (int qq = 0; qq < n; qq++) ss += mm[md][qq];
  for (int qq = 0; qq < n; qq++) ss += mm[qq][md];
  printf("%d\n", ss - mm[md][md] * 3);
  return 0;
}
