#include <bits/stdc++.h>
using namespace std;
template <class T>
string toStr(T s) {
  ostringstream os;
  os << s;
  return os.str();
}
template <class T>
char* toCharArr(T n) {
  char* s;
  sprintf(s, "%ld", n);
  return s;
}
int Int(char c) { return int(c - 48); }
template <class T>
int toInt(T s) {
  int re = 0;
  istringstream is(s);
  is >> re;
  return re;
}
inline bool cmp(pair<int, int> p, pair<int, int> q) {
  return p.second < q.second;
}
unsigned long long in() {
  int x = 0, c;
  for (; (unsigned long long)((c = getchar()) - '0') >= 10;) {
    if (c == '-') return -in();
    if (!~c) throw ~0;
  }
  do {
    x = (x << 3) + (x << 1) + (c - '0');
  } while ((unsigned long long)((c = getchar()) - '0') < 10);
  return x;
}
void QuickSort(int a[], int id[], int l, int r) {
  int i = l, j = r;
  while (i <= j) {
    int m = a[id[(l + r) / 2]];
    while (a[id[i]] < m) i++;
    while (a[id[j]] > m) j--;
    if (i <= j) {
      int tmp = id[i];
      id[i] = id[j];
      id[j] = tmp;
      i++;
      j--;
    }
    if (l < j) QuickSort(a, id, l, j);
    if (i < r) QuickSort(a, id, i, r);
  }
}
string Cong(string a, string b) {
  string re = "";
  for (int i = 0; i <= a.length() + 1; i++) re += '0';
  for (int i = a.length() - 1; i >= 0; i--) {
    int tmp = Int(a[i]) + Int(b[i]);
    if ((tmp + int(re[i] - 48)) < 10)
      re[i] = char(tmp + int(re[i] - 48));
    else {
      string s = toStr(tmp + int(re[i] - 48));
      re[i] = s[1];
      re[i - 1] = s[0];
    }
  }
  return re;
}
int main() {
  int n, x;
  long t = 0;
  cin >> n;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++) {
      cin >> x;
      if ((i + j) == (n - 1)) {
        t += x;
        continue;
      }
      if (i == (n - 1) / 2) {
        t += x;
        continue;
      }
      if (j == (n - 1) / 2) {
        t += x;
        continue;
      }
      if (i == j) {
        t += x;
      }
    }
  }
  cout << t;
}
