#include<bits/stdc++.h>
using namespace std;
const int MAXN = 2e2 + 5;
int a[MAXN][MAXN], dp[MAXN];
int main()
{
ios::sync_with_stdio(0);
cin.tie(0), cout.tie(0);
int n;
cin >> n;
for(int i = 1; i < n; i ++)
for(int j = i; j < n; j ++)
cin >> a[i][j];
memset(dp, 1e9, sizeof(dp));
for(int i = n - 1; i >= 1; i --)
for(int j = i; j < n; j ++)
dp[i] = min(dp[i], a[i][j] + dp[j]);
cout << dp[1];
return 0;
}