#include <bits/stdc++.h>
using namespace std;
const int N = 5001;
int A[N];
int dp[N][3001][2][2];
int fnc(int i, int k, int dec, int inc) {
  if (k < 0)
    return (1e9 + 1);
  else if (i == 1) {
    if (k == 0)
      return 0;
    else if (k == 1)
      return (inc == 1) ? 0 : (1e9 + 1);
    else
      return (1e9 + 1);
  } else if (dp[i][k][dec][inc] != -1)
    return dp[i][k][dec][inc];
  int ans = (1e9 + 1);
  int v;
  if (dec)
    v = A[i] >= A[i + 1] ? A[i + 1] - 1 : A[i];
  else
    v = A[i];
  if (inc == 0) {
    if (fnc(i - 1, k, 0, 1) != (1e9 + 1))
      ans = min(fnc(i - 1, k, 0, 1) + ((v >= A[i - 1]) ? v - A[i - 1] + 1 : 0),
                fnc(i - 1, k, 0, 0));
    else
      ans = fnc(i - 1, k, 0, 0);
  } else {
    if (fnc(i - 1, k - 1, 1, 0) != (1e9 + 1))
      ans = fnc(i - 1, k - 1, 1, 0) + ((v <= A[i - 1]) ? A[i - 1] - v + 1 : 0);
  }
  return dp[i][k][dec][inc] = ans;
}
void solve() {
  int n;
  scanf("%d", &n);
  for (__typeof((n)) i = (1); i <= (n); i++) scanf("%d", &A[i]);
  if (n == 1) {
    printf("0\n");
    return;
  }
  int r = (n + 1) / 2;
  memset(dp, -1, sizeof(dp));
  for (__typeof((r)) k = (1); k <= (r); k++)
    printf("%d ", min(fnc(n, k, 0, 0), fnc(n, k, 0, 1)));
  return;
}
signed main() {
  int t;
  ios_base::sync_with_stdio(false);
  t = 1;
  while (t--) solve();
  return 0;
}
