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