#include <bits/stdc++.h>
using namespace std;
long long dp[5008][2800][2];
int n;
int h[50008];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%d", &h[i]);
  h[0] = -1e6, h[n + 1] = -1e6;
  memset(dp, 0x3f, sizeof(dp));
  dp[1][0][0] = 0;
  for (int i = 1; i <= n; i++) {
    int need = h[i] - min(h[i - 1] - 1, h[i + 1] - 1);
    if (need < 0) need = 0;
    for (int j = 0; j <= (n + 1) / 2; j++) {
      int need = max(h[i - 1] - h[i] + 1, 0) + max(h[i + 1] - h[i] + 1, 0);
      dp[i + 2][j + 1][1] = min(dp[i][j][0] + need, dp[i + 2][j + 1][1]);
      if (i > 1)
        need = max(min(h[i - 2] - 1, h[i - 1]) - h[i] + 1, 0) +
               max(h[i + 1] - h[i] + 1, 0);
      if (i > 1)
        dp[i + 2][j + 1][1] = min(dp[i][j][1] + need, dp[i + 2][j + 1][1]);
      dp[i + 1][j][0] = min(dp[i][j][0], dp[i + 1][j][0]);
      dp[i + 1][j][0] = min(dp[i][j][1], dp[i + 1][j][0]);
    }
  }
  for (int i = 1; i <= (n + 1) / 2; i++)
    printf("%lld ", min(min(dp[n + 1][i][0], dp[n + 1][i][1]),
                        min(dp[n + 2][i][0], dp[n + 2][i][1])));
  return 0;
}
