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