#include <bits/stdc++.h>
using namespace std;
const int maxn = 5010;
const int inf = 1e9;
int a[maxn];
int f[maxn][maxn];
int g[maxn][maxn];
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  for (int(i) = (0); (i) < (n); (i)++) cin >> a[i];
  for (int(i) = (0); (i) < (n); (i)++)
    fill(g[i], g[i] + maxn, inf), fill(f[i], f[i] + maxn, inf);
  for (int(i) = (0); (i) < (n); (i)++) g[i][0] = 0;
  g[0][1] = inf;
  f[0][1] = 0;
  for (int(i) = (0); (i) < (n); (i)++) {
    if (i) f[i][1] = max(0, a[i - 1] - a[i] + 1);
    if (i)
      g[i][1] = min(g[i - 1][1], f[i - 1][1] + max(0, a[i] - a[i - 1] + 1));
  }
  for (int(k) = (2); (k) < (n); (k)++)
    for (int(i) = (2); (i) < (n); (i)++) {
      f[i][k] = f[i - 2][k - 1];
      f[i][k] += max(0, a[i - 1] - min(a[i], a[i - 2]) + 1);
      f[i][k] = min(f[i][k], g[i - 1][k - 1] + max(0, a[i - 1] - a[i] + 1));
      g[i][k] = min(g[i - 1][k], f[i - 1][k] + max(0, a[i] - a[i - 1] + 1));
    }
  for (int(k) = (1); (k) < ((n + 1) / 2 + 1); (k)++)
    cout << min(f[n - 1][k], g[n - 1][k]) << ' ';
  return 0;
}
