#include <bits/stdc++.h>

typedef long long LL;
const int N = 505;
const LL inf = 0x3f3f3f3f3f3f3f3f;

LL dp[2][N][N], sum1[N][N], sum2[N][N], ans = inf;
int n;

void down(LL &x, LL y) { x = std::min(x, y); }

int main() {
	std::ios::sync_with_stdio(0), std::cin.tie(0);
	std::cin >> n;
	for (int i = 1; i <= n; ++i) {
		for (int j = 1; j < i; ++j)
			std::cin >> sum1[i][j];
		for (int j = i + 1; j <= n; ++j)
			std::cin >> sum2[j][i];
	}
	for (int i = 1; i <= n; ++i)
		for (int j = 1; j < i; ++j)
			sum1[i][j] += sum1[i][j - 1], sum2[i][j] += sum2[i][j - 1];
	dp[1][1][0] = 0;
	for (int i = 2; i <= n; ++i) {
		int now = i & 1, lst = now ^ 1;
		std::memset(dp[now], 0x3f, sizeof dp[0]);
		for (int j = 1; j < i; ++j)
			for (int k = 0; k < j; ++k) if (dp[lst][j][k] < inf) {
				down(dp[now][j][k], dp[lst][j][k] + sum1[i][k - 1] + sum2[i][i - 1] - sum2[i][j - 1]);
				down(dp[now][i][j], dp[lst][j][k] + sum1[i][j - 1]);
			}
	}
	for (int i = 1; i <= n; ++i)
		for (int j = 0; j < i; ++j)
			down(ans, dp[n & 1][i][j]);
	std::cout << ans << '\n';
	return 0;
}