#include <bits/stdc++.h>
using namespace std;
int n, a[5005];
int dp[5005][5005][2];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  memset(dp, 127, sizeof(dp));
  dp[1][0][0] = 0;
  a[0] = -1061109567;
  a[n + 1] = -1061109567;
  a[n + 2] = -1061109567;
  for (int i = 1; i <= n + 2; i++) {
    for (int j = 0; j <= ((i) >> 1); j++) {
      dp[i + 1][j][0] = min(dp[i][j][0], dp[i + 1][j][0]);
      dp[i + 1][j][0] = min(dp[i][j][1], dp[i + 1][j][0]);
      if (a[i - 1] < a[i]) {
        if (a[i + 1] < a[i])
          dp[i + 2][j + 1][0] = min(dp[i + 2][j + 1][0], dp[i][j][0]);
        else
          dp[i + 2][j + 1][1] =
              min(dp[i + 2][j + 1][1], dp[i][j][0] + a[i + 1] - a[i] + 1);
      } else {
        if (a[i + 1] < a[i])
          dp[i + 2][j + 1][0] =
              min(dp[i + 2][j + 1][0], dp[i][j][0] + a[i - 1] - a[i] + 1);
        else
          dp[i + 2][j + 1][1] =
              min(dp[i + 2][j + 1][1],
                  dp[i][j][0] + a[i + 1] - a[i] + 1 + a[i - 1] - a[i] + 1);
      }
      if (i == 1) continue;
      if (a[i - 2] <= a[i]) {
        if (a[i + 1] < a[i])
          dp[i + 2][j + 1][0] = min(dp[i + 2][j + 1][0], dp[i][j][1]);
        else
          dp[i + 2][j + 1][1] =
              min(dp[i + 2][j + 1][1], dp[i][j][1] + a[i + 1] - a[i] + 1);
      } else {
        if (a[i + 1] < a[i])
          dp[i + 2][j + 1][0] =
              min(dp[i + 2][j + 1][0], dp[i][j][1] + a[i - 2] - a[i]);
        else
          dp[i + 2][j + 1][1] =
              min(dp[i + 2][j + 1][1],
                  dp[i][j][1] + a[i - 2] - a[i] + a[i + 1] - a[i] + 1);
      }
    }
  }
  for (int i = 1; i <= ((n + 1) >> 1); ++i) {
    printf("%d", min(dp[n + 2][i][0], dp[n + 2][i][1]));
    if (i == (n + 1) / 2)
      printf("\n");
    else
      printf(" ");
  }
}
