#include <bits/stdc++.h>
using namespace std;
const int maxn = 5000 + 10;
int f[maxn][maxn], Min[maxn][maxn];
int v[maxn];
inline void Dp();
inline int Calc(int, int, int, int);
int n;
int main() {
  scanf("%d", &n);
  for (register int i = 1; i <= n; ++i) scanf("%d", &v[i]);
  Dp();
  int z = (n + 1) / 2;
  for (register int i = 1; i <= z; ++i) printf("%d ", Min[n][i]);
  printf("\n");
  return 0;
}
inline void Dp() {
  memset(f, 0x3f, sizeof(f));
  memset(Min, 0x3f, sizeof(Min));
  for (int i = 0; i <= n; ++i) f[i][0] = 0, Min[i][0] = 0;
  f[1][1] = max(v[1], v[2] + 1) - v[1];
  Min[1][1] = f[1][1];
  for (register int i = 2; i < n; ++i) {
    for (register int j = 1; j <= i; ++j) {
      if (i - 2 >= 0 && j > 1)
        f[i][j] = min(f[i][j], f[i - 2][j - 1] +
                                   Calc(v[i - 2], v[i - 1], v[i], v[i + 1]));
      if (i - 3 >= 0 && j > 1)
        f[i][j] =
            min(f[i][j], Min[i - 3][j - 1] + Calc(0, v[i - 1], v[i], v[i + 1]));
      if (j == 1) f[i][j] = Calc(0, v[i - 1], v[i], v[i + 1]);
      Min[i][j] = min(Min[i - 1][j], f[i][j]);
    }
  }
  for (register int j = 1; j <= n; ++j) {
    if (n - 2 >= 0 && j > 1)
      f[n][j] =
          min(f[n][j], f[n - 2][j - 1] + Calc(v[n - 2], v[n - 1], v[n], 0));
    if (n - 3 >= 0 && j > 1)
      f[n][j] = min(f[n][j], Min[n - 3][j - 1] + Calc(0, v[n - 1], v[n], 0));
    if (j == 1) f[n][j] = Calc(0, v[n - 1], v[n], 0);
    Min[n][j] = min(Min[n - 1][j], f[n][j]);
  }
}
inline int Calc(int s1, int s2, int s3, int s4) {
  if (s1 == 0 && s4 == 0) {
    return max(s2 + 1, s3) - s3;
  } else if (s1 == 0) {
    return max(s2 + 1, s3) - s3 + max(s4 + 1, s3) - s3;
  } else if (s4 == 0) {
    s2 = min(s2, s1 - 1);
    return max(s2 + 1, s3) - s3;
  } else {
    s2 = min(s2, s1 - 1);
    return max(s2 + 1, s3) - s3 + max(s4 + 1, s3) - s3;
  }
}
