#include <bits/stdc++.h>
using namespace std;
const int Mxn = 5e3 + 7;
int dp[Mxn][2550][2], n, a[Mxn];
signed main() {
  ios::sync_with_stdio(NULL);
  cin.tie(NULL);
  cout.tie(NULL);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  memset(dp, 63, sizeof(dp));
  dp[1][1][1] = 0;
  dp[1][0][0] = 0;
  dp[0][0][0] = 0;
  for (int i = 2; i <= n; i++) {
    for (int j = 0; j <= (i + 1) >> 1; j++) {
      int pre1_0 = dp[i - 1][j][0];
      int pre1_1 = dp[i - 1][j][1] + max(0, a[i] - a[i - 1] + 1);
      dp[i][j][0] = min(pre1_0, pre1_1);
      int pre2_0 = dp[i - 2][j - 1][0] + max(0, a[i - 1] - a[i] + 1);
      int pre2_1 =
          dp[i - 2][j - 1][1] + max(0, a[i - 1] - min(a[i - 2], a[i]) + 1);
      dp[i][j][1] = min(pre2_0, pre2_1);
    }
  }
  for (int i = 1; i <= (n + 1) >> 1; i++) {
    cout << min(dp[n][i][0], dp[n][i][1]) << ' ';
  }
}
