#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
using namespace std;
int main(){
	int n, t, dp[2][5001][2];
    scanf("%d",&n);
	rep(i,2)rep(j,5001)rep(k,2)dp[i][j][k]=100000000;
    dp[0][1][0] = 0; dp[0][0][1] = 0;
    for(int i = 1; i < n; i++){
        scanf("%d",&t);
        for(int j = 0; j <= n/2; j++){
            if(j != 0){
                dp[1][j][0] = min(dp[0][j-1][0],dp[0][j-1][1]+t);
                dp[1][j][1] = min(dp[0][j][1],dp[0][j][0]+t);
            } else dp[1][j][1] = dp[0][j][1];
        }
        for(int j = 0; j <= n/2; j++)rep(k,2)dp[0][j][k] = dp[1][j][k];
    }
    printf("%d\n", min(dp[0][n/2][0],dp[0][n/2][1]));
}