import java.util.Scanner;
import static java.lang.System.*;
public class Main {
public static void main(String[] args) {
Scanner scan = new Scanner(in);
int n = scan.nextInt();
int ax = 0;
int ay = 0;
int bx = n - 1;
int by = 0;
int a = 0;
int b = 0;
for (int y = 0; y < n; ++y) {
for (int x = 0; x < n; ++x) {
int c = scan.nextInt();
if (ax == x && ay == y) {
a += c;
++ax;
++ay;
}
if (bx == x && by == y) {
b += c;
--bx;
++by;
}
}
}
out.println(Math.abs(a - b));
}
}