#include <bits/stdc++.h>
using namespace std;
int a[5005], f[5005][5005][3];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= (n); ++i) scanf("%d", &a[i]);
  a[0] = a[n + 1] = -0x3f3f3f3f;
  memset(f, (0x3f), sizeof f);
  int m = (n + 1) / 2;
  f[0][0][2] = 0;
  for (int i = 0; i < (n + 1); ++i)
    for (int j = 0; j < (m + 1); ++j)
      for (int k = 0; k < (3); ++k)
        if (f[i][j][k] != 0x3f3f3f3f) {
          int t = f[i][j][k];
          if (k == 0) {
            f[i + 1][j][k + 1] =
                min(f[i + 1][j][k + 1], t + max(0, a[i + 1] - a[i] + 1));
          } else if (k == 1) {
            f[i + 1][j][k + 1] = min(f[i + 1][j][k + 1], t);
            int c1 = max(0, a[i] - a[i - 1] + 1);
            int c2 = max(0, a[i] - a[i + 1] + 1);
            int cm = max(c1, c2);
            f[i + 1][j + 1][0] = min(f[i + 1][j + 1][0], t - c1 + cm);
          } else {
            f[i + 1][j][2] = min(f[i + 1][j][2], t);
            f[i + 1][j + 1][0] =
                min(f[i + 1][j + 1][0], t + max(0, a[i] - a[i + 1] + 1));
          }
        }
  for (int i = 1; i <= (m); ++i) {
    int ans = min(f[n][i][0], min(f[n][i][1], f[n][i][2]));
    printf("%d ", ans);
  }
  puts("");
  return 0;
}
