#include <bits/stdc++.h>
using namespace std;
int n, m, ans, t[2505][5005], I, arr[5005];
int get_val(int x, int y) { return max(x - y + 1, 0); }
void dnc(int l, int r, int s, int e) {
  if (s > e) return;
  int mid = (s + e) >> 1, x = 0x3fffffff, y = l, i;
  for (i = l; i <= r; i++) {
    if (i == 0 && I - 1) continue;
    if (i && i >= mid - 1) continue;
    x = t[I - 1][i];
    if (mid > 1) {
      if (i == mid - 2 && I - 1 && i)
        x += get_val(min(arr[mid - 2] - 1, arr[mid - 1]), arr[mid]);
      else
        x += get_val(arr[mid - 1], arr[mid]);
    }
    if (mid < n) x += get_val(arr[mid + 1], arr[mid]);
    if (t[I][mid] > x) {
      t[I][mid] = x;
      y = i;
    }
  }
  ans = min(ans, t[I][mid]);
  dnc(l, y, s, mid - 1);
  dnc(y, r, mid + 1, e);
}
int main() {
  int i, j;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d", &arr[i]);
  m = (n / 2) + (n % 2);
  for (i = 1; i <= m; i++)
    for (j = 1; j <= n; j++) t[i][j] = 0x3fffffff;
  for (I = 1; I <= m; I++) {
    ans = 0x3fffffff;
    dnc(0, n, I, n);
    printf("%d ", ans);
  }
  printf("\n");
  return 0;
}
