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