#include<stdio.h>
#include<string.h>
#define res(x,y) (x==-1?INF:(x+y))
#define min(x,y) (x<y?x:y)

int INF=9999999;
int main(){
	int n,dp[2][5001][2],i,j,cost;
	memset(dp,-1,sizeof(dp));
	scanf("%d",&n);
	dp[1][0][1]=dp[1][1][0]=0;
	for(i=0;i<n-1;i++){
		scanf("%d",&cost);
		for(j=0;j<=n/2;j++){
			dp[i&1][j][0]=min((j?res(dp[(i+1)&1][j-1][0],0):INF),(j?res(dp[(i+1)&1][j-1][1],cost):INF));
			dp[i&1][j][1]=min(res(dp[(i+1)&1][j][1],0),res(dp[(i+1)&1][j][0],cost));
		}
	}
	printf("%d\n",min(dp[0][n/2][0],dp[0][n/2][1]));	
}


/*

m h
- 0
0 -
- -
- -


- 0
1 




*/