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