#include <bits/stdc++.h>
using namespace std;
const int NN = 5010;
int a[NN];
long long ans[NN >> 1];
long long dyna[NN][NN >> 1];
long long mnm[NN][NN >> 1];
int main() {
  int n, i, j;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) {
    scanf("%d", a + i);
    memset(dyna[i], 0x3f3f, sizeof dyna[i]);
    memset(mnm[i], 0x3f3f, sizeof mnm[i]);
  }
  memset(mnm[0], 0x3f3f, sizeof mnm[0]);
  memset(ans, 0x3f3f, sizeof ans);
  for (i = 1; i <= n; i++) {
    dyna[i][1] = max(0, a[i - 1] - a[i] + 1) + max(0, a[i + 1] - a[i] + 1);
    mnm[i][1] = min(mnm[i - 1][1], dyna[i][1]);
    if (ans[1] > dyna[i][1]) {
      ans[1] = dyna[i][1];
    }
    for (j = i + 1 >> 1; j > 1; j--) {
      dyna[i][j] =
          dyna[i - 2][j - 1] + max(0, a[i - 1] - min(a[i], a[i - 2]) + 1) +
          max(0, a[i + 1] - a[i] + 1) - max(0, a[i - 1] - a[i - 2] + 1);
      if (i > 3) {
        dyna[i][j] =
            min(dyna[i][j], mnm[i - 3][j - 1] + max(0, a[i + 1] - a[i] + 1) +
                                max(0, a[i - 1] - a[i] + 1));
      }
      mnm[i][j] = dyna[i][j];
      if (mnm[i][j] > mnm[i - 1][j]) {
        mnm[i][j] = mnm[i - 1][j];
      }
      if (dyna[i][j] < ans[j]) {
        ans[j] = dyna[i][j];
      }
    }
  }
  for (i = 1; i <= (n + 1 >> 1); i++) {
    printf("%I64d ", ans[i]);
  }
  return 0;
}
