#include <bits/stdc++.h>
using namespace std;
const int maxn = 5000 + 100;
const int maxm = 5e3 + 100;
const double eps = 1e-10;
const int inf = 0x3f3f3f3f;
const double pi = acos(-1.0);
int Scan() {
  int res = 0, ch, flag = 0;
  if ((ch = getchar()) == '-')
    flag = 1;
  else if (ch >= '0' && ch <= '9')
    res = ch - '0';
  while ((ch = getchar()) >= '0' && ch <= '9') res = res * 10 + ch - '0';
  return flag ? -res : res;
}
int f[maxn][maxn][2];
int a[maxn];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
  }
  a[0] = a[n + 1] = -0x3f;
  memset(f, 0x3f, sizeof(f));
  f[0][0][0] = 0;
  f[1][0][0] = 0;
  f[1][1][1] = 0;
  int m = (n + 1) / 2;
  for (int i = 2; i <= n; i++) {
    f[i][0][0] = 0;
    for (int j = 1; j <= m; j++) {
      f[i][j][0] =
          min(f[i - 1][j][0], f[i - 1][j][1] + max(0, a[i] - a[i - 1] + 1));
      int tmp1 = a[i - 1] - min(a[i], a[i - 2]) + 1;
      int tmp2 = a[i - 1] - a[i] + 1;
      f[i][j][1] = min(f[i - 2][j - 1][0] + max(tmp2, 0),
                       f[i - 2][j - 1][1] + max(tmp1, 0));
    }
  }
  for (int i = 1; i <= m; i++) {
    printf("%d ", min(f[n][i][0], f[n][i][1]));
  }
  return 0;
}
