#include <bits/stdc++.h>
using namespace std;
int f[5011][2511][2], a[5011];
int main() {
  int n, i, j;
  a[0] = 0;
  scanf("%d", &n);
  for (i = 1; i <= n; ++i) scanf("%d", &a[i]);
  a[n + 1] = 0;
  memset(f, 0x3f, sizeof(f));
  f[0][0][0] = f[0][0][1] = 0;
  if (n >= 1) {
    f[1][0][0] = f[1][0][1] = f[1][1][1] = 0;
    f[1][1][0] = max(0, 1 + a[2] - a[1]);
  }
  if (n >= 2) {
    if (a[2] > a[1]) f[2][0][1] = f[2][1][1] = 0;
    f[2][0][0] = 0;
    f[2][1][0] = min(f[1][1][0], f[2][1][1] + max(0, 1 + a[3] - a[2]));
  }
  for (i = 3; i <= n; ++i) {
    if (a[i] > a[i - 1]) f[i][0][1] = 0;
    f[i][0][0] = 0;
    for (j = 1; j <= (i + 1) / 2; ++j) {
      f[i][j][1] =
          min(f[i - 2][j - 1][1] + max(0, 1 + a[i - 1] - min(a[i - 2], a[i])),
              f[i - 3][j - 1][0] + max(0, 1 + a[i - 1] - a[i]));
      f[i][j][0] =
          min(f[i - 1][j][0], f[i][j][1] + max(0, 1 + a[i + 1] - a[i]));
    }
  }
  for (i = 1; i <= (n + 1) / 2; ++i) printf("%d ", f[n][i][0]);
  return 0;
}
