#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5000 + 10;
int n, a[MAXN], dp[MAXN][MAXN], prmin[MAXN][MAXN];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    for (int j = 0; j < n; j++) {
      prmin[i][j] = INT_MAX / 2;
      dp[i][j] = INT_MAX / 2;
    }
  }
  if (n == 1) {
    cout << 0 << endl;
    return 0;
  }
  dp[0][1] = max(0, a[1] - a[0] + 1);
  prmin[0][1] = dp[0][1];
  for (int i = 1; i < n; i++) {
    dp[i][1] = max(0, a[i + 1] - a[i] + 1) + max(0, a[i - 1] - a[i] + 1);
    prmin[i][1] = min(prmin[i - 1][1], dp[i][1]);
  }
  for (int i = 2; i < n; i++) {
    for (int j = 2; j <= (i + 2) / 2; j++) {
      int k = min(a[i - 2] - 1, a[i - 1]);
      dp[i][j] =
          dp[i - 2][j - 1] + max(0, a[i + 1] - a[i] + 1) + max(0, k - a[i] + 1);
      if (i > 2) {
        dp[i][j] =
            min(dp[i][j], prmin[i - 3][j - 1] + max(0, a[i + 1] - a[i] + 1) +
                              max(0, a[i - 1] - a[i] + 1));
      }
      prmin[i][j] = min(prmin[i - 1][j], dp[i][j]);
    }
  }
  for (int j = 1; j <= (n + 1) / 2; j++) cout << prmin[n - 1][j] << " ";
  cout << endl;
  return 0;
}
