nho moi nguo cai tien (Bai nay chi chay 45 %)
const
fi='';
fo='';
nmax=230;
var n: longint;
a:array[0..nmax,0..nmax] of INT64;
f:array[0..nmax] of int64;
procedure input;
var f:text;
i,j: integer;
begin
assign(f,fi); reset(f);
readln(f,n);
fillchar(a,sizeof(a),0);
for i:=1 to n do
begin
for j:=1 to n do
read(f,a[i,j]);
readln(f);
end;
close(f);
for i:=2 to n do
begin
a[0,i]:=a[1,i];
a[i,0]:=a[i,1];
a[i,n+1]:=a[i,1];
a[n+1,i]:=a[1,i];
a[i,n+2]:=a[i,1];
a[n+2,i]:=a[1,i];
end;
n:=n+2;
end;
procedure init;
begin
f[1]:=0;
f[2]:=a[1,2];
end;
procedure chaybo(x,y,z,t: longint; var kq: longint);
var tr,i: longint;
begin
kq:=0;
tr:=x;
for i:=x+1 to y do
if (i<>z) and(i<>t) then
begin
kq:=kq+a[tr,i];
tr:=i;
end;
kq:=kq+a[z,t];
end;
procedure qhd;
var i,j,kq,tg: longint;
begin
for i:=3 to n do
begin
f[i]:=f[i-1]+a[i-2,i];
for j:=i-2 downto 2 do
begin
chaybo(j-1,i,j,i-1,kq);
chaybo(j-1,i-1,j,i,tg);
if tg chaybo(j,i,j-1,i-1,tg);
if tg chaybo(j,i-1,j-1,i,tg);
if tg if f[j]+kq end;
end;
end;
procedure output;
var g:text;
begin
assign(g,fo);
rewrite(g);
writeln(g,f[n]);
close(g);
end;
BEGIN
input;
init;
qhd;
output;
END.