#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int maxn = 5678;
int n;
int ans[maxn];
int h[maxn];
ll dp[maxn][maxn];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> h[i];
  }
  ll ans = 3e18;
  for (int i = 1; i <= n; i++) {
    dp[0][i] = max(0, h[i + 1] - h[i] + 1) + max(0, h[i - 1] - h[i] + 1);
    ans = min(ans, 1LL * dp[0][i]);
  }
  cout << ans << " ";
  dp[0][0] = 5000000000000000000LL;
  int cur = 0;
  for (int i = 2; i <= (n + 1) / 2; i++) {
    cur ^= 1;
    memset(dp[cur], 42, sizeof(dp[cur]));
    ans = 5000000000000000000LL;
    ll pow = 1000000000000000000LL;
    for (int j = 1; j <= n; j++) {
      if (j > 1) {
        dp[cur][j] = dp[cur ^ 1][j - 2] - max(0, h[j - 1] - h[j - 2] + 1);
        dp[cur][j] += max(0, max(h[j - 1] - h[j - 2], h[j - 1] - h[j]) + 1) +
                      max(0, h[j + 1] - h[j] + 1);
      }
      dp[cur][j] = min(dp[cur][j], pow + max(0, h[j - 1] - h[j] + 1) +
                                       max(0, h[j + 1] - h[j] + 1));
      ans = min(ans, dp[cur][j]);
      if (j > 1) {
        pow = min(pow, dp[cur ^ 1][j - 2]);
      }
    }
    cout << ans << " ";
  }
  cout << endl;
  return 0;
}
