#include <bits/stdc++.h>

using namespace std;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef long long LL;
typedef vector<LL> VL;
typedef vector<VL> VVL;
typedef pair<int,int> PI; 
typedef pair<LL,LL> PLL;
typedef unsigned long long ULL;
typedef pair<double,double> PD;

#define FOR(x, b, e) for(int x = b; x<= (e); x++)
#define FORD(x, b, e) for(int x = b; x>= (e); x--)
#define REP(x, n) for(int x = 0; x<(n); ++x)
#define ALL(c) (c).begin(), (c).end()
#define SIZE(x) ((int)(x).size())

#define PB push_back
#define IN insert
#define ST first
#define ND second
#define INF 2000000011
#define MOD 1000000007

#define MAXS 510

int n;

int main(){
	
	ios::sync_with_stdio(0); cin.tie(0);
	cin>>n;
	
	VVL dp(n,VL(n,LONG_LONG_MAX));
	VVL pref(n,VL(n));
	VVI tab(n,VI(n));
	
	FOR(i,0,n-1){
		FOR(j,0,n-1){
			if(i==j)
				continue;
			cin>>tab[i][j];
		}
	}
	
	FOR(dl,1,n){
		REP(i,n){
			int j=dl+i;
			if(j>=n)
				break;
			if(dl==1){
				pref[i][j]=tab[i][j];
				pref[j][i]=tab[j][i];
			}
			else{
				pref[i][j]=pref[i][j-1]+pref[i+1][j]-pref[i+1][j-1]+tab[i][j];
				pref[j][i]=pref[j-1][i]+pref[j][i+1]-pref[j-1][i+1]+tab[j][i];
			}
		}
	}
	
	REP(i,n){
		if(i==0){
			FOR(j,0,n-1)
				dp[0][j]=min(dp[0][j],pref[0][j]);
		}
		else{
			FOR(j,i,n-1)
				REP(k,i)
					dp[i][j]=min(dp[i][j],dp[k][i-1]+pref[i][j]+pref[j][0]-pref[j][k]-pref[i-1][0]+pref[i-1][k]);
		}
	}
	
	LL wyn=LONG_LONG_MAX;
	REP(i,n)
		wyn=min(wyn,dp[i][n-1]);
	cout<<wyn;
	
	return 0;
}
