#include <bits/stdc++.h>
using namespace std;
const long long maxn = 5000 + 7, mod = 1e9 + 7, MAXN = 2e6 + 7;
const double eps = 1e-9;
const long long INF = 1e18, inf = 1e15;
mt19937 rnd(chrono::steady_clock::now().time_since_epoch().count());
long long n;
long long a[maxn];
long long dp1[maxn][3];
long long dp2[maxn][3];
void solve() {
  cin >> n;
  for (long long i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  a[0] = -inf;
  for (long long i = 0; i < maxn; ++i) {
    for (long long j = 0; j < 3; ++j) {
      dp1[i][j] = inf;
      dp2[i][j] = inf;
    }
  }
  dp1[0][2] = 0;
  for (long long i = 1; i <= n; ++i) {
    for (long long j = 0; j <= (n + 1) / 2; ++j) {
      dp2[j + 1][0] =
          min(dp2[j + 1][0], dp1[j][2] + a[i - 1] - min(a[i - 1], a[i] - 1));
      if (i >= 2) {
        long long nw = min(a[i - 2] - 1, a[i - 1]);
        dp2[j + 1][0] = min(dp2[j + 1][0], dp1[j][1] + nw - min(nw, a[i] - 1));
      }
      dp2[j][2] = min(dp2[j][2], dp1[j][1]);
      dp2[j][2] = min(dp2[j][2], dp1[j][2]);
      dp2[j][1] = min(dp2[j][1], dp1[j][0] + a[i] - min(a[i], a[i - 1] - 1));
    }
    for (long long j = 0; j <= n; ++j) {
      for (long long k = 0; k < 3; ++k) {
        dp1[j][k] = dp2[j][k];
        dp2[j][k] = inf;
      }
    }
  }
  for (long long i = 1; i <= (n + 1) / 2; ++i) {
    cout << min(dp1[i][0], min(dp1[i][1], dp1[i][2])) << " ";
  }
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.precision(20);
  cout << fixed;
  long long t = 1;
  for (long long i = 0; i < t; ++i) {
    solve();
  }
  return 0;
}
