#include <bits/stdc++.h>
using namespace std;
const int MAXN = (int)5e3 + 5;
const int INF = (int)1e9;
int dp[2][MAXN][MAXN];
int ans[MAXN];
int arr[MAXN];
int n;
int dist(int a, int b) { return max(0, a - b); }
int cost(int ps, bool prev) {
  int ret = 0;
  if (ps + 1 <= n) {
    ret += dist(arr[ps + 1], arr[ps] - 1);
  }
  if (ps - 1 > 0) {
    int v = arr[ps - 1];
    if (prev && ps - 2 > 0) {
      v = min(v, arr[ps - 2] - 1);
    }
    ret += dist(v, arr[ps] - 1);
  }
  return ret;
}
void solve() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", &arr[i]);
  }
  for (int i = 1; i <= (n + 1) / 2; ++i) {
    ans[i] = INF;
  }
  for (int i = 1; i <= n; ++i) {
    for (int j = 0; j <= n; ++j) {
      for (int last = 0; last < 2; ++last) {
        dp[last][i][j] = INF;
      }
    }
  }
  dp[1][1][1] = cost(1, 0);
  dp[0][1][0] = 0;
  dp[1][2][1] = cost(2, 0);
  dp[0][2][0] = 0;
  for (int i = 3; i <= n; ++i) {
    for (int j = 0; j <= n; ++j) {
      for (int d = 2; d <= 3 && i - d > 0; ++d) {
        for (int pr = 0; pr < 2; ++pr) {
          dp[0][i][j] = min(dp[0][i][j], dp[pr][i - d][j]);
        }
      }
      if (j > 0) {
        dp[1][i][j] = min(dp[0][i - 2][j - 1] + cost(i, 0),
                          dp[1][i - 2][j - 1] + cost(i, 1));
        if (i > 3) {
          dp[1][i][j] = min(dp[1][i][j], dp[0][i - 3][j - 1] + cost(i, 0));
          dp[1][i][j] = min(dp[1][i][j], dp[1][i - 3][j - 1] + cost(i, 0));
        }
      }
    }
  }
  for (int i = 1; i <= (n + 1) / 2; ++i) {
    for (int j = 1; j <= n; ++j) {
      ans[i] = min(ans[i], dp[0][j][i]);
      ans[i] = min(ans[i], dp[1][j][i]);
    }
  }
  for (int i = 1; i <= (n + 1) / 2; ++i) {
    printf("%d ", ans[i]);
  }
}
int main() {
  int tt = 1;
  while (tt--) {
    solve();
  }
  return 0;
}
