#include <bits/stdc++.h>
using namespace std;
const long long oo = 1e17;
long long n, k;
long long a[5003];
long long ans[5003];
long long f[5003][5003];
long long Min[5003];
void init() {
  cin >> n;
  k = n / 2 + (n % 2 != 0);
  for (long long i = 1; i <= n; i++) cin >> a[i];
}
void solve() {
  memset(f, -1, sizeof(f));
  for (long long i = 1; i <= k; i++) Min[i] = oo;
  f[0][0] = 0;
  f[1][0] = 0;
  f[1][1] = max(0LL, a[2] - a[1] + 1);
  for (long long i = 2; i <= n; i++) {
    f[i][0] = 0;
    f[i][1] = max(0LL, a[i - 1] - a[i] + 1) + max(0LL, a[i + 1] - a[i] + 1);
    for (long long j = 2; j <= k; j++) {
      long long res = oo;
      if (Min[j - 1] != oo)
        res = min(res, Min[j - 1] + max(0LL, a[i - 1] - a[i] + 1) +
                           max(0LL, a[i + 1] - a[i] + 1));
      if (i - 2 >= 0 && f[i - 2][j - 1] != -1)
        res = min(res, f[i - 2][j - 1] - max(0LL, a[i - 1] - a[i - 2] + 1) +
                           max(0LL, a[i - 1] - min(a[i - 2], a[i]) + 1) +
                           max(0LL, a[i + 1] - a[i] + 1));
      if (res == oo) continue;
      f[i][j] = res;
    }
    for (long long j = 1; j <= k; j++)
      if (f[i - 2][j] != -1) Min[j] = min(Min[j], f[i - 2][j]);
  }
  for (long long j = 1; j <= k; j++) {
    ans[j] = oo;
    for (long long i = 1; i <= n; i++)
      if (f[i][j] != -1) ans[j] = min(ans[j], f[i][j]);
    cout << ans[j] << " ";
  }
}
int main() {
  init();
  solve();
}
