#include<bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=(a);i<=(b);++i)
typedef long long LL;
const int N = 505;

int n,x,a[N][N];
LL s1[N][N], s2[N][N], dp[N][N];

int main(){
	scanf("%d",&n);
	rep(i,1,n)rep(j,1,n-1){
		scanf("%d",&x);
		a[i][j+(j>=i)]=x;
	}
	
	rep(i,1,n){
		LL sum1 = 0, sum2 = 0;
		rep(j,i,n){
			sum1 += a[i][j], sum2 += a[j][i];
			s1[i][j] = s1[i-1][j] + sum1;
			s2[i][j] = s2[i-1][j] + sum2;
		} 
	}
	
	rep(i,0,n+1)rep(j,0,n+1)dp[i][j]=1e18;
	dp[1][0]=0;
	rep(i,1,n)rep(j,0,i-1)rep(x,i+1,n+1){
		LL sum1 = s1[x-1][x-1] - s1[i-1][x-1];
		LL sum2 = s2[i-1][n] - (j?s2[j-1][n]:0) - s2[i-1][x-1] + (j?s2[j-1][x-1]:0);
		dp[x][i] = min(dp[x][i], dp[i][j] + sum1 + sum2);
	}
	LL ans = 1e18;
	rep(i,1,n) ans = min(ans, dp[n+1][i]);
	printf("%lld\n",ans);
	return 0;
}