#include<cstdio>
#include<algorithm>
using namespace std;

int dp[2][2][5001];

int main(){
  int n;
  int t[10000];
  scanf("%d",&n);
  for(int i=0;i<n-1;i++)scanf("%d",&t[i]);
  
  for(int i=0;i<=n/2;i++)dp[0][0][i] = dp[0][1][i] = 100000000;
  dp[0][0][1] = 0;

  for(int i=0;i<n-1;i++){
    int ii = i&1;
    for(int j=0;j<=n/2;j++)dp[1-ii][0][j] = dp[1-ii][1][j] = 100000000;

    for(int j=0;j<2;j++){
      for(int k=0;k<=n/2;k++){
	if(k<n/2)dp[1-ii][j][k+1] = min(dp[1-ii][j][k+1], dp[ii][j][k]);
	if(i+1-k<n/2 && 0<=i+1-k+1)dp[1-ii][1-j][i+1-k+1] = min(dp[1-ii][1-j][i+1-k+1],dp[ii][j][k] + t[i]);
      }
    }
  }

  printf("%d\n",min(dp[1][0][n/2],dp[1][1][n/2]));
}