#include <bits/stdc++.h>
using namespace std;
int get() {
  char ch;
  while (!((ch = getchar() - 48) >= 0))
    ;
  int v = ch;
  while (((ch = getchar() - 48) >= 0)) v = (v << 1) + (v << 3) + ch;
  return v;
}
int n, a[5005], F[5005][5005][3];
int cl(int x) {
  if (x == 1) return 0;
  if (a[x] <= a[x - 1]) return a[x - 1] - a[x] + 1;
  return 0;
}
int cr(int x) {
  if (x == n) return 0;
  if (a[x] <= a[x + 1]) return a[x + 1] - a[x] + 1;
  return 0;
}
int cl2(int x) {
  if (x <= 2) return cl(x);
  int tmp = min(a[x - 1], a[x - 2] - 1);
  if (a[x] <= tmp) return tmp - a[x] + 1;
  return 0;
}
int main() {
  n = get();
  for (int i = 1; i <= n; i++) a[i] = get();
  F[0][0][0] = 0;
  F[0][0][1] = F[0][0][2] = F[0][1][0] = F[0][1][1] = F[0][1][2] = 1e9;
  for (int i = 1; i <= n; i++) {
    F[i][0][0] = 0;
    F[i][0][1] = F[i][0][2] = 1e9;
    for (int j = 1; j <= i / 2; j++) {
      F[i][j][0] = min(F[i - 1][j][0], F[i - 1][j][1]);
      F[i][j][1] = F[i - 1][j][2];
      F[i][j][2] = min(F[i - 1][j - 1][0] + cl(i) + cr(i),
                       F[i - 1][j - 1][1] + cl2(i) + cr(i));
    }
    if (i & 1) {
      F[i][(i + 1) / 2][0] = F[i][(i + 1) / 2][1] = 1e9;
      F[i][(i + 1) / 2][2] = min(F[i - 1][i / 2][0] + cl(i) + cr(i),
                                 F[i - 1][i / 2][1] + cl2(i) + cr(i));
    }
  }
  for (int i = 1; i <= (n + 1) / 2; i++)
    printf("%d ", min(min(F[n][i][0], F[n][i][1]), F[n][i][2]));
  return 0;
}
