#include <bits/stdc++.h>
using namespace std;
int H[5005];
int dp[5005][5005][2];
int ans[5005];
int main() {
  int n, m;
  cin >> n;
  m = (n + 1) / 2;
  for (int i = 1; i <= n; i++) scanf("%d", &H[i]);
  memset(dp, 0x3f, sizeof(dp));
  dp[0][0][0] = 0;
  dp[1][0][0] = 0;
  dp[1][1][1] = 0;
  H[0] = dp[2][2][2];
  for (int i = 2; i <= n; i++) {
    dp[i][0][0] = dp[i - 1][0][0];
    for (int j = 1; j <= (i + 1) / 2; 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][0] + max(0, H[i - 1] - H[i] + 1),
              dp[i - 2][j - 1][1] + max(0, H[i - 1] - min(H[i - 2], H[i]) + 1));
    }
  }
  for (int i = 1; i <= m; i++) printf("%d ", min(dp[n][i][0], dp[n][i][1]));
  puts("");
  return 0;
}
