#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void read(T& x) {
  char c = getchar();
  bool f = false;
  for (x = 0; !isdigit(c); c = getchar()) {
    if (c == '-') {
      f = true;
    }
  }
  for (; isdigit(c); c = getchar()) {
    x = x * 10 + c - '0';
  }
  if (f) {
    x = -x;
  }
}
template <typename T, typename... U>
inline void read(T& x, U&... y) {
  read(x), read(y...);
}
const int N = 5e3 + 11;
int n, INF;
int G[N], F[N][N], ANS[N], A[N];
int Calc(int a, int b, int c) {
  b = min(b, a - 1);
  return max(0, b - c + 1);
}
int main() {
  read(n);
  if (n == 1) return puts("0"), 0;
  for (int i = 1; i <= n; ++i) read(A[i]);
  if (n == 2) return printf("%d\n", A[1] == A[2] ? 1 : 0), 0;
  memset(F, 127, sizeof(F));
  INF = F[0][0];
  F[1][1] = max(0, A[2] - A[1] + 1);
  F[2][1] = max(0, A[1] - A[2] + 1) + max(0, A[3] - A[2] + 1);
  int K = n + 1 >> 1;
  memset(G, 127, sizeof(G));
  for (int i = 3; i <= n; ++i) {
    F[i][1] = i == n
                  ? max(0, A[i - 1] - A[i] + 1)
                  : max(0, A[i - 1] - A[i] + 1) + max(0, A[i + 1] - A[i] + 1);
    for (int j = 2; j <= K; ++j) {
      if (G[j - 1] != INF)
        F[i][j] = G[j - 1] + max(0, A[i - 1] - A[i] + 1) +
                  max(0, A[i + 1] - A[i] + 1);
      if (F[i - 2][j - 1] != INF) {
        F[i][j] =
            min(F[i][j], F[i - 2][j - 1] + Calc(A[i - 2], A[i - 1], A[i]) +
                             max(0, A[i + 1] - A[i] + 1));
        G[j - 1] = min(G[j - 1], F[i - 2][j - 1]);
      }
    }
  }
  memset(ANS, 127, sizeof(ANS));
  for (int i = 1; i <= n; ++i)
    for (int j = 1; j <= K; ++j) ANS[j] = min(ANS[j], F[i][j]);
  for (int i = 1; i <= K; ++i) printf("%d ", ANS[i]);
  puts("");
  return 0;
}
