#include <bits/stdc++.h>
using namespace std;
char gc() {
  static char buf[100000], *p1 = buf, *p2 = buf;
  return p1 == p2 && (p2 = (p1 = buf) + fread(buf, 1, 100000, stdin), p1 == p2)
             ? EOF
             : *p1++;
}
long long read() {
  char ch = getchar();
  long long x = 0;
  int op = 1;
  for (; !isdigit(ch); ch = getchar())
    if (ch == '-') op = -1;
  for (; isdigit(ch); ch = getchar()) x = (x << 1) + (x << 3) + ch - '0';
  return x * op;
}
int n, m, a[5005], f[5005][5005][2];
int main() {
  n = read();
  m = (n + 1) / 2;
  for (int i = (1); i <= (n); i++) a[i] = read();
  memset(f, 0x3f, sizeof(f));
  f[0][0][0] = 0;
  for (int i = (1); i <= (n); i++)
    for (int j = (0); j <= ((i + 1) / 2); j++) {
      f[i][j][0] = min(f[i - 1][j][0], f[i - 1][j][1]);
      if (!j) continue;
      f[i][j][1] =
          min(f[i][j][1], f[i - 1][j - 1][0] + max(a[i - 1] - a[i] + 1, 0) +
                              max(a[i + 1] - a[i] + 1, 0));
      if (i < 2) continue;
      if (a[i - 2] <= a[i - 1])
        f[i][j][1] =
            min(f[i][j][1], f[i - 2][j - 1][1] + max(a[i - 2] - a[i], 0) +
                                max(a[i + 1] - a[i] + 1, 0));
      else
        f[i][j][1] =
            min(f[i][j][1], f[i - 2][j - 1][1] + max(a[i - 1] - a[i] + 1, 0) +
                                max(a[i + 1] - a[i] + 1, 0));
    }
  for (int i = (1); i <= (m); i++) printf("%d ", min(f[n][i][0], f[n][i][1]));
  return 0;
}
