#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5005;
int n, q, num[MAXN], f[MAXN][MAXN / 2][3];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &num[i]);
  memset(f, 0x7f, sizeof f);
  num[0] = num[1] + 1;
  f[1][1][0] = f[1][0][1] = f[1][0][2] = 0;
  for (int i = 2; i <= n; i++) {
    f[i][0][2] = 0;
    for (int j = 0; j <= (i + 1) >> 1; j++) {
      if (j >= 1) {
        if (num[i] > num[i - 1])
          f[i][j][0] = min(f[i][j][0], f[i - 1][j - 1][2]);
        else
          f[i][j][0] =
              min(f[i][j][0], f[i - 1][j - 1][2] + (num[i - 1] - num[i] + 1));
        if (num[i] > min(num[i - 2] - 1, num[i - 1]))
          f[i][j][0] = min(f[i][j][0], f[i - 1][j - 1][1]);
        else
          f[i][j][0] = min(f[i][j][0],
                           f[i - 1][j - 1][1] +
                               (min(num[i - 2] - 1, num[i - 1]) - num[i] + 1));
      }
      if (num[i] < num[i - 1])
        f[i][j][1] = f[i - 1][j][0];
      else
        f[i][j][1] = f[i - 1][j][0] + (num[i] - num[i - 1] + 1);
      f[i][j][2] = min(f[i - 1][j][1], f[i - 1][j][2]);
    }
  }
  for (int j = 1; j <= (n + 1) >> 1; j++)
    printf("%d ", min(min(f[n][j][0], f[n][j][1]), f[n][j][2]));
}
