#include <bits/stdc++.h>
using namespace std;
int dp[5005][2505][2];
int f[5005][2502][2];
int a[5005];
int res[5005];
int main() {
  int n, m;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  memset(dp, 0x3f, sizeof dp);
  memset(f, 0x3f, sizeof f);
  memset(res, 0x3f, sizeof res);
  dp[0][0][0] = f[0][0][0] = 0;
  for (int i = 1; i <= n; i++) {
    for (int j = 0; j <= (i + 1) / 2; j++) {
      if (j == 0) {
        dp[i][j][0] = dp[i - 1][j][0];
        f[i][j][0] = a[i];
      } else {
        int cal1 = dp[i - 1][j][0];
        int cal2 = dp[i - 1][j][1] + max(0, (a[i] - f[i - 1][j][1]) + 1);
        if (cal1 < cal2) {
          dp[i][j][0] = cal1;
          f[i][j][0] = a[i];
        } else {
          dp[i][j][0] = cal2;
          f[i][j][0] = min(a[i], f[i - 1][j][1] - 1);
        }
        cal1 = dp[i - 1][j - 1][0] + max(f[i - 1][j - 1][0] - a[i] + 1, 0);
        dp[i][j][1] = cal1;
        f[i][j][1] = a[i];
        int lef = dp[i][j][0];
        int rig = dp[i][j][1] + max(0, a[i + 1] - f[i][j][1] + 1);
        res[j] = min(res[j], min(lef, rig));
      }
    }
  }
  for (int i = 1; i <= (n + 1) / 2; i++) {
    cout << res[i] << " ";
  }
}
