#include <bits/stdc++.h>
using namespace std;
struct edge {
  long long u, c;
};
const long long INF = (long long)1e18;
int N;
const int MAX_N = 5010;
long long a[MAX_N];
void input() {
  cin >> N;
  for (int i = 1; i <= N; i++) {
    cin >> a[i];
  }
}
long long dp[MAX_N][MAX_N / 2];
long long dp2[MAX_N][MAX_N / 2];
long long ans[MAX_N];
void solve() {
  for (int i = 0; i <= N; i++) {
    for (int j = 0; j <= (N + 1) / 2; j++) {
      dp[i][j] = dp2[i][j] = INF;
    }
    ans[i] = INF;
  }
  for (int i = 0; i <= N; i++) {
    dp[i][0] = 0;
    dp2[i][0] = 0;
  }
  dp[1][1] = 0;
  dp2[1][1] = max(0ll, a[2] - a[1] + 1);
  ans[1] = max(0ll, a[2] - a[1] + 1);
  for (int i = 2; i <= N; i++) {
    for (int k = 1; k <= (i + 1) / 2; k++) {
      long long cost = max(0ll, a[i - 1] - a[i] + 1);
      if (i == 2)
        dp[i][k] = dp[i - 2][k - 1] + cost;
      else
        dp[i][k] = dp[i - 2][k - 1] + cost +
                   max(0ll, min(a[i] - 1, a[i - 1]) - a[i - 2] + 1);
      if (i >= 3) dp[i][k] = min(dp[i][k], dp2[i - 3][k - 1] + cost);
      ans[k] = min(ans[k], dp[i][k] + max(0ll, a[i + 1] - a[i] + 1));
      dp2[i][k] = dp[i][k] + max(0ll, a[i + 1] - a[i] + 1);
      dp2[i][k] = min(dp2[i][k], dp2[i - 1][k]);
    }
  }
  for (int i = 1; i <= (N + 1) / 2; i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
}
int main() {
  ios::sync_with_stdio(false);
  input();
  solve();
  return 0;
}
