#include "bits/stdc++.h"
#define all(x) x.begin(),x.end()
#define rep(i,N) for(int i=0;i<(int)N;++i)
using namespace std;
using ll = long long;
using vint = vector<int>;
using vll = vector<ll>;
using vll2 = vector<vector<ll>>;
const ll INF = (1LL << 30);
const ll LINF = (1LL << 60);
const ll MOD = 1e9 + 7;

ll dp[2][2][5001];

int main() {
   cin.tie(0);
   ios::sync_with_stdio(false);

   int N; cin >> N;
   vll t(N - 1);
   rep(i, N - 1) cin >> t[i];

   rep(i, 2) rep(j, 2) rep(k, 5001) dp[i][j][k] = LINF;
   dp[0][0][1] = dp[0][1][0] = 0;

   ll ans = LINF;
   for (int i = 1; i < N; ++i) {
      for (int j = 0; j <= N / 2; ++j) {
         if (j >= 1)
            dp[i & 1][0][j] = min({
            dp[i & 1][0][j],
            dp[(i - 1) & 1][0][j - 1],
            dp[(i - 1) & 1][1][j - 1] + t[i - 1] });
         dp[i & 1][1][j] = min({
            dp[(i - 1) & 1][0][j] + t[i - 1],
            dp[(i - 1) & 1][1][j] });
      }
      rep(k, 2) rep(j, N / 2 + 1) {
         dp[(i - 1) & 1][k][j] = LINF;
      }
   }

   cout << min(dp[(N - 1) & 1][0][N / 2], dp[(N - 1) & 1][1][N / 2]) << endl;
}
