#include <bits/stdc++.h>
using namespace std;
int main() {
  int t;
  cin >> t;
  int sum = 0;
  int w;
  for (int x = 0; x < t; x++) {
    for (int z = 0; z < t; z++) {
      int y;
      cin >> y;
      if (x == z || x + z == t - 1 || x == t / 2 || z == t / 2) sum += y;
    }
  }
  cout << sum;
  return 0;
}
