#include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <sstream>
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <numeric>
#include <cctype>
#include <tuple>
#include <array>

#ifdef _MSC_VER
#include <agents.h>
#endif

#define FOR(i, a, b) for(int i = (a); i < (int)(b); ++i)
#define rep(i, n) FOR(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define REV(v) v.rbegin(), v.rend()
#define MEMSET(v, s) memset(v, s, sizeof(v))
#define X first
#define Y second

using namespace std;

typedef long long ll;
typedef pair<int, int> P;

int dp[2][5010][2];
int t[10010];

int main(){
	int n;
	cin >> n;
	FOR(i, 1, n) cin >> t[i];
	rep(i, 2) rep(j, n/2+1) rep(k, 2) dp[i][j][k] = 1 << 29;
	dp[0][0][0] = dp[0][0][1] = 0;

	rep(i, n){
		rep(j, n / 2) rep(k, 2) rep(l, 2){
			int x = k == 1;
			dp[i + 1 & 1][j + x][k] = min(dp[i + 1 & 1][j + x][k], dp[i & 1][j][l] + t[i] * (k != l));
		}
		rep(j, n / 2 + 1) rep(k, 2) dp[i & 1][j][k] = 1 << 29;
	}
	cout << min(dp[0][n / 2][0], dp[0][n / 2][1]) << endl;

	return 0;
}