#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<n;i++)
#define rrep(i,n) for(int i=1;i<=n;i++)
#define drep(i,n) for(int i=n;i>=0;i--)
#define MAX 10001
#define ll long long
#define dmp make_pair
#define dpb push_back
#define P pair<int,int>
#define fi first
#define se second
using namespace std;
//__gcd(a,b), __builtin_popcount(a);
const int inf = 1e9;
const ll INF = 1e18;
#define B 100

int a[MAX], dp[2][MAX][2];
int main(){
	int n, t1, t2;
	scanf("%d", &n);
	rep(i,2)rep(j,MAX)rep(k,2)dp[i][j][k] = inf;
	for(int i = 2;i <= n;i++)scanf("%d", &a[i]);
	dp[0][0][0] = dp[0][0][1] = 0;
	
	for(int i = 1;i <= n;i++){
		for(int j = 1;j <= n/2+1;j++){
			dp[i%2][j][0] = min(dp[(i-1)%2][j-1][0], dp[(i-1)%2][j-1][1]+a[i]);
			dp[i%2][j][1] = min(dp[(i-1)%2][j][1], dp[(i-1)%2][j][0]+a[i]);
		}
		rep(j,n)rep(k,2)dp[(i-1)%2][j][k] = inf;
	}
	
	printf("%d\n", min(dp[n%2][n/2][0], dp[n%2][n/2][1]));
	return 0;
}