#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma loop_opt(on)
using namespace std;
using ll = long long;
using pii = pair<int, int>;
using pll = pair<long long, long long>;
using ld = long double;
const int mod = 1000000007;
const int hnum = 998244353;
const ld PI = acos(-1);
long long qpow(long long x, long long powcnt, long long tomod) {
  long long res = 1;
  for (; powcnt; powcnt >>= 1, x = (x * x) % tomod)
    if (1 & powcnt) res = (res * x) % tomod;
  return (res % tomod);
}
long long inv(long long x) { return qpow(x, mod - 2, mod); }
const long long N = 5010;
long long n;
long long a[N];
long long dp[N][N / 2];
long long mn[N / 2];
void solve() {
  cin >> n;
  for (long long i = 1; i <= n; i++) cin >> a[i];
  memset((dp), (0x3f3f3f3f), sizeof((dp)));
  memset((mn), (0x3f3f3f3f), sizeof((mn)));
  mn[0] = 0;
  for (long long i = 1; i <= n; i++) {
    long long need =
        max(0LL, a[i + 1] - a[i] + 1) + max(0LL, a[i - 1] - a[i] + 1);
    for (long long j = 1; j <= (n + 1) / 2; j++) {
      dp[i][j] = mn[j - 1] + need;
      if (i > 1)
        dp[i][j] =
            min(dp[i][j], dp[i - 2][j - 1] + max(0LL, a[i + 1] - a[i] + 1) +
                              max(0LL, min(a[i - 1], a[i - 2] - 1) - a[i] + 1));
    }
    if (i > 1)
      for (long long j = 1; j <= (n + 2) / 2; j++)
        mn[j] = min(mn[j], dp[i - 1][j]);
  }
  for (long long i = 1; i <= (n + 1) / 2; i++)
    cout << min(mn[i], dp[n][i]) << ' ';
  cout << '\n';
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long t = 1;
  while (t--) solve();
}
