#include <bits/stdc++.h>
using namespace std;
typedef int ll;
ll power(ll a, ll b, ll m) {
  ll ans = 1;
  while (b) {
    if (b & 1) ans = (ans * a) % m;
    b /= 2;
    a = (a * a) % m;
  }
  return ans;
}
ll a[5002];
ll n;
ll dp[5002][2][5002];
ll go(ll ind, bool last, ll house) {
  if (ind > n) {
    if (house == 0) return 0;
    return 1000000007;
  }
  if (dp[ind][last][house] != -1) return dp[ind][last][house];
  ll ans = 0;
  if (last) {
    ll req = a[ind] - 1;
    ll left_req = 0, right_req = 0;
    ll left_val = min(a[ind - 1], a[ind - 2] - 1);
    ll right_val = a[ind + 1];
    if (left_val >= a[ind]) left_req += left_val - req;
    if (right_val >= a[ind]) right_req += right_val - req;
    ans = left_req + right_req + go(ind + 2, 1, house - 1);
    ans = min(ans, go(ind + 1, 0, house));
  } else {
    ll req = a[ind] - 1;
    ll left_req = 0, right_req = 0;
    if (a[ind - 1] >= a[ind]) left_req += a[ind - 1] - req;
    if (a[ind + 1] >= a[ind]) right_req += a[ind + 1] - req;
    ans = left_req + right_req + go(ind + 2, 1, house - 1);
    ans = min(ans, go(ind + 1, 0, house));
  }
  return dp[ind][last][house] = ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  a[0] = -1000000007;
  a[n + 1] = -1000000007;
  for (ll i = 1; i < n + 1; i++) cin >> a[i];
  ll up = (n / 2) + (n % 2);
  memset(dp, -1, sizeof(dp));
  for (ll i = 1; i < up + 1; i++) {
    ll ans = go(1, 0, i);
    cout << ans << " ";
  }
  cout << endl;
}
