#include<bits/stdc++.h>
#define ll long long
#define ld long double
#define db double
#define pint pair<int,int>
#define mk(x,y) make_pair(x,y)
#define fir first
#define sec second
#define Rep(x,y,z) for(int x=y;x<=z;x++)
#define Red(x,y,z) for(int x=y;x>=z;x--)
using namespace std;
const int MAXN=505;
char buf[1<<12],*pp1=buf,*pp2=buf,nc;int ny;
inline char gc() {return pp1==pp2&&(pp2=(pp1=buf)+fread(buf,1,1<<12,stdin),pp1==pp2)?EOF:*pp1++;}
//inline char gc(){return getchar();}
inline int read(){
	int x=0;for(ny=1;nc=gc(),(nc<48||nc>57)&&nc!=EOF;)if(nc==45)ny=-1;if(nc<0)return nc;
	for(x=nc-48;nc=gc(),47<nc&&nc<58&&nc!=EOF;x=(x<<3)+(x<<1)+(nc^48));return x*ny;
}
int a[MAXN][MAXN],n;ll Sum[2][MAXN][MAXN],F[MAXN][MAXN];
inline ll Get(int opt,int lx,int rx,int ly,int ry){return Sum[opt][rx][ry]-Sum[opt][lx-1][ry]-Sum[opt][rx][ly-1]+Sum[opt][lx-1][ly-1];}
int main(){
//	freopen("std.in","r",stdin);
//	freopen("std.out","w",stdout);
	n=read();
	Rep(i,1,n)Rep(j,1,n)if(j!=i)a[i][j]=read();
	Rep(i,1,n)Rep(j,1,n){
		if(i<j)Sum[0][i][j]=a[i][j];if(i>j)Sum[1][i][j]=a[i][j];
		Sum[0][i][j]+=Sum[0][i-1][j]+Sum[0][i][j-1]-Sum[0][i-1][j-1];
		Sum[1][i][j]+=Sum[1][i-1][j]+Sum[1][i][j-1]-Sum[1][i-1][j-1];
	}memset(F,0x3f,sizeof(F)),F[0][0]=0;
	Rep(i,0,n)Rep(j,0,max(i-1,0))Rep(k,i+1,n)F[k][i]=min(F[k][i],F[i][j]+Get(1,k+1,n,j+1,i)+Get(0,i+1,k,i+1,k));
	ll ans=1e18;Rep(j,0,n)ans=min(ans,F[n][j]);cout<<ans<<"\n";
	return 0;
}


