#include <bits/stdc++.h>
using namespace std;
int n, a[101][101], ans;
bool c[101][101];
int main() {
  cin >> n;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < n; j++) {
      cin >> a[i][j];
      if (i == j) ans += a[i][j], c[i][j] = true;
    }
  int i = n - 1, j = 0;
  while (i >= 0) {
    if (!c[i][j]) ans += a[i][j], c[i][j] = true;
    i--;
    j++;
  }
  int k = (n + 1) / 2 - 1;
  for (int j = 0; j < n; j++)
    if (!c[k][j]) ans += a[k][j], c[k][j] = true;
  for (int i = 0; i < n; i++)
    if (!c[i][k]) ans += a[i][k], c[i][k] = true;
  cout << ans;
}
