#include<bits/stdc++.h>
using namespace std;
enum type{
	A,
	B,
};
int dp[3][5001][2];
int main(void){
	int n;
	int i,j,k,l;
	
	int a[10001];
	cin>>n;
	for(i=1;i<n;i++)	cin>>a[i];
	for(i=1;i<=2;i++){
		for(j=0;j<=n/2;j++){
			dp[i][j][A]=INT_MAX;
			dp[i][j][B]=INT_MAX;
		}
	}
	dp[1][1][A]=0;dp[1][0][B]=0;
	for(i=1;i<n;i++){
		if(i%2!=0){
			k=1;l=2;
			for(j=0;j<=n/2;j++){
				dp[l][j][A]=INT_MAX;
				dp[l][j][B]=INT_MAX;
			}
		}
		else	  {
			k=2;l=1;
			for(j=0;j<=n/2;j++){
				dp[l][j][A]=INT_MAX;
				dp[l][j][B]=INT_MAX;
			}
		}
		for(j=0;j<=n/2;j++){
			if(dp[k][j][A]!=INT_MAX){
				dp[l][j+1][A]=min(dp[l][j+1][A],dp[k][j][A]);
				if(j+1<=n/2)	dp[l][j][B]=min(dp[l][j][B],dp[k][j][A]+a[i]);
			}
			if(dp[k][j][B]!=INT_MAX){
				dp[l][j][B]=min(dp[l][j][B],dp[k][j][B]);
				if(j+1<=n/2)	dp[l][j+1][A]=min(dp[l][j+1][A],dp[k][j][B]+a[i]);
			}
		}
		/* for(j=0;j<=n/2;j++)	cout<<dp[l][j][A]<<"/"<<dp[l][j][B]<<" ";
		cout<<endl; */
	}
	
		
	cout<<min(dp[l][n/2][A],dp[l][n/2][B])<<endl;
	return 0;
}
	
