#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  int arr[n][n];
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> arr[i][j];
    }
  }
  int sum = 0;
  for (int i = 0; i < n; i++) {
    for (int j = i; j <= i; j++) {
      sum += arr[i][j];
    }
  }
  int res = n / 2, c = 1;
  for (int i = 0; i < n; i++) {
    for (int j = n - 1 - i; j >= n - 1 - i; j--) {
      if (res == i)
        continue;
      else
        sum += arr[i][j];
    }
  }
  for (int i = res; i <= res; i++) {
    for (int j = 0; j < n; j++) {
      if (res == i && res == j)
        continue;
      else
        sum += arr[i][j];
    }
  }
  for (int i = 0; i < n; i++) {
    for (int j = res; j <= res; j++) {
      if (res == i && res == j)
        continue;
      else
        sum += arr[i][j];
    }
  }
  cout << sum << endl;
  return 0;
}
