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