#include <bits/stdc++.h>
using namespace std;
const int maxn = 5007;
const int inf = (1LL << 29);
int dp[maxn][2507][2], a[maxn];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) cin >> a[i];
  memset(dp, 127 / 3, sizeof(dp));
  dp[1][0][0] = dp[0][0][0] = dp[1][1][1] = 0;
  for (int i = 2; i <= n; i++) {
    for (int k = 0; k <= (n - 1) / 2 + 1; k++) {
      dp[i][k][0] =
          min(dp[i - 1][k][0], dp[i - 1][k][1] + max(0, a[i] - (a[i - 1] - 1)));
      if (k)
        dp[i][k][1] =
            min(dp[i - 2][k - 1][0] + max(0, a[i - 1] - (a[i] - 1)),
                dp[i - 2][k - 1][1] + max(0, a[i - 1] - (a[i - 2] - 1)) +
                    max(0, min(a[i - 2] - 1, a[i - 1]) - (a[i] - 1)));
    }
  }
  for (int i = 1; i <= (n - 1) / 2 + 1; i++)
    printf("%d ", min(dp[n][i][0], dp[n][i][1]));
  return 0;
}
