#define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <math.h>
#include <string>
#include <algorithm>
using namespace std;
int n;
int temp[105][105];
int ans;
int main() {
scanf("%d", &n);
int mid = (n + 1) / 2;
for (int i = 1;i <= n;++i) {
for (int j = 1;j <= n;++j) {
scanf("%d", &temp[i][j]);
if (i == j) {
ans += temp[i][j];
}
if ((i + j) == (n + 1)) {
ans += temp[i][j];
}
if (i == mid) {
ans += temp[i][j];
}
if (j == mid) {
ans += temp[i][j];
}
}
}
printf("%d\n", ans - temp[mid][mid] * 3);
//system("pause");
return 0;
}