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