#include <bits/stdc++.h>
using namespace std;
int N;
int A[5002];
int dp[5002][2502][2];
int main() {
  ios::sync_with_stdio(0);
  cin >> N;
  for (int i = 1; i <= N; i++) cin >> A[i];
  for (int i = 0; i <= N; i++)
    for (int j = 0; j <= (N + 1) / 2; j++)
      dp[i][j][0] = dp[i][j][1] = 1LL << 29;
  for (int i = 0; i <= N; i++) dp[i][0][1] = 0;
  dp[1][1][0] = max(0, A[2] - A[1] + 1);
  for (int i = 2; i <= N; i++)
    for (int j = 1; j <= (N + 1) / 2; j++) {
      int rightCost = max(0, A[i + 1] - A[i] + 1);
      int leftCost = max(0, A[i - 1] - A[i] + 1);
      dp[i][j][0] =
          min(dp[i][j][0], dp[i - 2][j - 1][1] + leftCost + rightCost);
      int h = min(A[i - 1], A[i - 2] - 1);
      leftCost = max(0, h - A[i] + 1);
      dp[i][j][0] =
          min(dp[i][j][0], dp[i - 2][j - 1][0] + leftCost + rightCost);
      dp[i][j][1] = min(dp[i][j][1], min(dp[i - 1][j][0], dp[i - 1][j][1]));
    }
  for (int i = 1; i <= (N + 1) / 2; i++)
    cout << min(dp[N][i][0], dp[N][i][1]) << " ";
  cout << "\n";
  return 0;
}
