#include <bits/stdc++.h>

using namespace std;

#define rep(i,x) for(int i=0;i<x;++i)
#define a a

const int inf = 1e9;

int dp[2][2][5050];

signed main()
{
	int n; cin >> n;
	
	vector<int> t(n-1);
	
	rep(i, n-1) cin>>t[i+1];
	
	rep(i,2)rep(j,2)rep(k,n/2+1) dp[i][j][k] = inf;
	
	dp[0][1][0] = 0;
	
	rep(i, n) {
		//cout<<"t["<<i<<"] = " << t[i] << endl;
		rep(j, min(n/2, i)+1) {
			dp[(i+1)%2][1][j+1] = min(dp[i&1][1][j], dp[i&1][0][j] + t[i]);
			dp[(i+1)%2][0][j] = min(dp[i&1][0][j], dp[i&1][1][j] + t[i]);
		}
		dp[(i+1)&1][1][0] = inf;
	}
	
	//rep(i,n) rep(j,n/2+1) printf("dp[%d][%d] = %d\n", i,j,dp[i][j]);
	
	cout << min(dp[0][0][n/2], dp[0][1][n/2]) << endl;
}