#include <bits/stdc++.h>
using namespace std;
const int maxn = 5e5 + 5;
int a[5005];
int dp[2][5005][5005];
void init() {
  for (int i = 0; i < 5005; i++)
    for (int j = 0; j < 5005; j++) dp[0][i][j] = dp[1][i][j] = 1e9;
  dp[0][0][0] = 0;
}
int main() {
  int i, j, k, n, m, q, x, y, h, cnt, l, r;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d", &a[i]);
  init();
  a[0] = 0;
  a[n + 1] = 0;
  k = (n + 1) / 2;
  for (i = 1; i <= n; i++) {
    dp[0][i][0] = min(dp[0][i - 1][0], dp[1][i - 1][0]);
    for (j = 1; j <= (i + 1) / 2; j++) {
      dp[0][i][j] = min(dp[0][i - 1][j], dp[1][i - 1][j]);
      if (i < 3) {
        cnt = 0;
        x = a[i - 1];
        if (x >= a[i]) cnt += (x + 1 - a[i]);
        x = a[i + 1];
        if (x >= a[i]) cnt += (x + 1 - a[i]);
        dp[1][i][j] = cnt;
      } else {
        cnt = 0;
        x = a[i - 1];
        if (x >= a[i]) cnt += (x + 1 - a[i]);
        x = a[i + 1];
        if (x >= a[i]) cnt += (x + 1 - a[i]);
        dp[1][i][j] = min(dp[1][i][j], dp[0][i - 2][j - 1] + cnt);
        cnt = 0;
        x = a[i + 1];
        if (x >= a[i]) cnt += (x + 1 - a[i]);
        if (a[i - 1] >= a[i - 2])
          x = a[i - 2] - 1;
        else
          x = a[i - 1];
        if (x >= a[i]) cnt += (x + 1 - a[i]);
        dp[1][i][j] = min(dp[1][i][j], dp[1][i - 2][j - 1] + cnt);
      }
    }
  }
  int ans;
  for (j = 1; j <= k; j++) {
    ans = 1e9;
    ans = min(ans, dp[0][n][j]);
    ans = min(ans, dp[1][n][j]);
    if (j != 1) printf(" ");
    printf("%d", ans);
  }
  printf("\n");
  return 0;
}
