#include <bits/stdc++.h>

typedef long long ll;
const int N = 540;
const ll INF = 0x3f3f3f3f3f3f3f3fll;

int n;
ll L[N][N], R[N][N], f[N][N];

inline void down(ll &x, const ll y) {x > y ? x = y : 0;}

inline void sum2D(ll (*a)[N]) {
	int i, j;
	for (i = 1; i <= n; ++i) for (j = 1; j <= n; ++j) a[i][j] += a[i][j - 1];
	for (i = 1; i <= n; ++i) for (j = 1; j <= n; ++j) a[i][j] += a[i - 1][j];
}

inline ll sum(ll (*a)[N], int r1, int r2, int c1, int c2) {return a[r2][c2] - a[r2][c1] - a[r1][c2] + a[r1][c1];} // (r1, r2] X (c1, c2]

int main() {
	int i, j, k;
	scanf("%d", &n);
	for (i = 1; i <= n; ++i) {
		for (j = 1; j < i; ++j) scanf("%lld", L[i] + j);
		for (; ++j <= n; ) scanf("%lld", R[i] + j);
	}
	sum2D(L), sum2D(R), memset(f, 63, sizeof f);
	for (i = 1; i < n; ++i) f[i][0] = R[i][i];
	for (i = 1; i < n; ++i)
		for (j = 0; j < i; ++j) if (f[i][j] < INF)
			for (k = i + 1; k <= n; ++k)
				down(f[k][i], f[i][j] + sum(R, i, k, i, k) + sum(L, k, n, j, i));
	printf("%lld\n", *std::min_element(f[n], f[n] + n));
	return 0;
}