#include <bits/stdc++.h>
int dp[(int)5005][(int)5005];
int N;
int a[(int)5005];
int ans[(int)5005];
int Calc(int x, int y, int z) {
  return std::max(x - y + 1, 0) + std::max(z - y + 1, 0);
}
int main() {
  scanf("%d", &N);
  for (int i = (1); i <= (N); ++i) scanf("%d", &a[i]);
  memset(dp, 0x3f, sizeof dp);
  for (int i = (1); i <= (N); ++i) dp[i][1] = Calc(a[i - 1], a[i], a[i + 1]);
  for (int j = (2); j <= (N); ++j) {
    int Min = 0x3f3f3f3f;
    for (int i = (3); i <= (N); ++i) {
      if (j > (i + 1) / 2) continue;
      if (i >= 3) {
        dp[i][j] = std::min(dp[i][j], Min + Calc(a[i - 1], a[i], a[i + 1]));
        Min = std::min(Min, dp[i - 2][j - 1]);
      }
      dp[i][j] = std::min(
          dp[i][j], dp[i - 2][j - 1] +
                        Calc(std::min(a[i - 2] - 1, a[i - 1]), a[i], a[i + 1]));
    }
  }
  memset(ans, 0x3f, sizeof ans);
  for (int i = (1); i <= (N); ++i)
    for (int j = (1); j <= ((i + 1) / 2); ++j)
      ans[j] = std::min(ans[j], dp[i][j]);
  for (int j = (1); j <= ((N + 1) / 2); ++j) printf("%d ", ans[j]);
  return 0;
}
