#include <bits/stdc++.h>
using namespace std;
int dp[5005][5005 / 2][2];
int n;
int a[5005];
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n;
  memset((dp), (0x3f3f3f3f), sizeof((dp)));
  dp[0][0][0] = dp[0][0][1] = 0;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  a[0] = a[n + 1] = 0;
  int num = (n + 1) >> 1;
  dp[1][0][0] = dp[1][0][1] = dp[1][1][1] = 0;
  for (int i = 2; i <= n; ++i) {
    dp[i][0][0] = dp[i][0][1] = 0;
    for (int j = 1; j <= num; ++j) {
      dp[i][j][0] =
          min(dp[i - 1][j][1] + max(0, a[i] - a[i - 1] + 1), dp[i - 1][j][0]);
      dp[i][j][1] =
          min(dp[i - 2][j - 1][1] + max(0, a[i - 1] - min(a[i - 2], a[i]) + 1),
              dp[i - 2][j - 1][0] + max(0, a[i - 1] - a[i] + 1));
    }
  }
  for (int i = 1; i <= num; ++i)
    std::cout << min(dp[n][i][0], dp[n][i][1]) << ' ';
  return 0;
}
