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