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