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