#include <bits/stdc++.h>
using namespace std;
long long dp[2][2501][3][2];
int N, arr[5001];
int main() {
  cin >> N;
  if (N == 1) {
    cout << 0 << endl;
    return 0;
  }
  for (int i = 0; i < N; i++) cin >> arr[i];
  for (int i = 0; i < 2; i++)
    for (int j = 0; j <= (N + 1) / 2; j++)
      for (int k = 0; k < 3; k++)
        for (int l = 0; l < 2; l++) dp[i][j][k][l] = 1001001001;
  dp[0][1][0][1] = 0;
  dp[0][0][1][0] = 0;
  if (arr[0] >= arr[1]) dp[0][0][2][0] = 0;
  for (int i = 0; i < N; i++) {
    for (int j = 0; j <= (N + 1) / 2; j++) {
      if (dp[0][j][0][0] != 1001001001) {
        dp[0][j][0][0] += arr[i] - (arr[i - 1] - 1);
        if (arr[i + 1] > (arr[i - 1] - 1))
          dp[1][j + 1][0][1] = min(dp[1][j + 1][0][1], dp[0][j][0][0]);
        dp[1][j][1][0] = min(dp[1][j][1][0], dp[0][j][0][0]);
        if (i + 2 < N && arr[i + 1] >= arr[i + 2])
          dp[1][j][2][0] = min(dp[1][j][2][0], dp[0][j][0][0]);
      }
      if (dp[0][j][1][0] != 1001001001) {
        if (arr[i + 1] > arr[i])
          dp[1][j + 1][0][1] = min(dp[1][j + 1][0][1], dp[0][j][1][0]);
        dp[1][j][1][0] = min(dp[1][j][1][0], dp[0][j][1][0]);
        if (i + 2 < N && arr[i + 1] >= arr[i + 2])
          dp[1][j][2][0] = min(dp[1][j][2][0], dp[0][j][1][0]);
      }
      if (dp[0][j][2][0] != 1001001001) {
        dp[0][j][2][0] += arr[i] - (arr[i + 1] - 1);
        dp[1][j + 1][0][1] = min(dp[1][j + 1][0][1], dp[0][j][2][0]);
        dp[1][j][1][0] = min(dp[1][j][1][0], dp[0][j][2][0]);
      }
      if (dp[0][j][0][1] != 1001001001) {
        if (arr[i + 1] >= arr[i])
          dp[1][j][0][0] = min(dp[1][j][0][0], dp[0][j][0][1]);
        else
          dp[1][j][1][0] = min(dp[1][j][1][0], dp[0][j][0][1]);
        if (i + 2 < N && arr[i + 2] - 1 < arr[i] && arr[i + 1] >= arr[i + 2])
          dp[1][j][2][0] = min(dp[1][j][2][0], dp[0][j][0][1]);
      }
    }
    for (int j = 0; j <= (N + 1) / 2; j++)
      for (int k = 0; k < 3; k++)
        for (int l = 0; l < 2; l++) {
          dp[0][j][k][l] = dp[1][j][k][l];
          dp[1][j][k][l] = 1001001001;
        }
  }
  for (int i = 1; i <= (N + 1) / 2; i++) {
    long long ans = 1001001001;
    for (int j = 0; j < 3; j++) {
      for (int k = 0; k < 2; k++) {
        ans = min(ans, dp[0][i][j][k]);
      }
    }
    cout << ans << endl;
  }
  return 0;
}
