#include <bits/stdc++.h>
using namespace std;
int n;
int a[101][101];
int tong = 0;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= n; j++) {
      cin >> a[i][j];
    }
  for (int i = 1; i <= n; i++) {
    tong = tong + a[i][i] + a[i][n + 1 - i] + a[i][(n / 2) + 1] +
           a[(n / 2) + 1][i];
  }
  tong = tong - (a[(n / 2) + 1][(n / 2) + 1] * 3);
  cout << tong;
  return 0;
}
