#include <bits/stdc++.h>
using namespace std;
int main() {
  int n = 0;
  cin >> n;
  int temp = 0;
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    int counter = 0;
    for (int j = 0; j < n; j++) {
      cin >> temp;
      if (i == j)
        sum += temp;
      else if (j + i + 1 == n)
        sum += temp;
      else if (j == (n - 1) / 2)
        sum += temp;
      else if (i == (n - 1) / 2)
        sum += temp;
      counter++;
    }
  }
  cout << sum;
  return 0;
}
