#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
inline bool odd(int x) { return (x & 1); }
int main() {
  ios_base::sync_with_stdio(0), ios::sync_with_stdio(0), cin.tie(0),
      cout.tie(0);
  ;
  int n, a[105][105] = {};
  cin >> n;
  for (int i = 1; i <= n; ++i) {
    for (int j = 1; j <= n; ++j) cin >> a[i][j];
  }
  int sum = 0;
  for (int i = 1; i <= n; ++i) {
    sum += a[(n + 1) / 2][i];
    a[(n + 1) / 2][i] = 0;
    sum += a[i][(n + 1) / 2];
    a[i][(n + 1) / 2] = 0;
    sum += a[i][i];
    a[i][i] = 0;
    sum += a[i][n - i + 1];
    a[i][n - i + 1] = 0;
  }
  return cout << sum << "\n", 0;
  return 0;
}
