#include <bits/stdc++.h>
using namespace std;
int n;
int temp[105][105];
int ans;
int cnt;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) {
      scanf("%d", &temp[i][j]);
      if (i == j) {
        ans += temp[i][j];
      }
      if (i == (n / 2) + 1) {
        ans += temp[i][j];
      }
      if (j == (n / 2) + 1) {
        ans += temp[i][j];
      }
      if ((i + j) == (n + 1)) {
        ans += temp[i][j];
      }
    }
  }
  printf("%d\n", ans - 3 * temp[n / 2 + 1][n / 2 + 1]);
  return 0;
}
