#include <bits/stdc++.h>
using namespace std;
 
const int inf = 1e9 + 9;
 
int n;
int t[10101];
 
int dp[2][2][5050];
 
int main()
{
  cin >> n;
  for (int i = 1; i < n; i++){
    cin >> t[i];
  }
 
  for (int i = 0; i < 2; i++)
    for (int j = 0; j < 2; j++)
      for (int k = 0; k < 5050; k++)
        dp[i][j][k] = inf;
 
  dp[0][0][0] = 0;
  for (int i = 0; i < n; i++){
    for (int j = 0; j < n / 2; j++){
      dp[(i + 1) & 1][0][j + 1] = min(dp[i & 1][0][j], dp[i & 1][1][j] + t[i + 1]);
      dp[(i + 1) & 1][1][j] = min(dp[i & 1][0][j] + t[i + 1], dp[i & 1][1][j]);
 
      dp[i & 1][0][j] = dp[i & 1][1][j] = inf;
    }
  }
 
  cout << dp[n & 1][0][n / 2] << endl;
} 