#include <bits/stdc++.h>
using namespace std;
const int maxn = 5010;
int n, a[maxn], dp[maxn][maxn][2];
int main() {
  cin >> n;
  for (register int i = 0; i <= n; ++i)
    for (register int j = 0; j <= n; ++j)
      for (register int k = 0; k <= 1; ++k) dp[i][j][k] = 600000000;
  for (register int i = 1; i <= n; ++i) scanf("%d", &a[i]);
  dp[1][1][1] = dp[1][0][0] = dp[0][0][0] = 0;
  for (register int i = 2; i <= n; ++i)
    for (register int j = 0; j <= n; ++j) {
      if (j == 0) {
        dp[i][j][0] = dp[i][j][1] = 0;
        continue;
      }
      if (a[i] >= a[i - 1])
        dp[i][j][0] = min(dp[i][j][0], dp[i - 1][j][1] + a[i] - a[i - 1] + 1);
      else
        dp[i][j][0] = min(dp[i][j][0], dp[i - 1][j][1]);
      dp[i][j][0] = min(dp[i][j][0], dp[i - 1][j][0]);
      if (a[i - 1] >= a[i])
        dp[i][j][1] =
            min(dp[i][j][1], dp[i - 2][j - 1][0] + a[i - 1] - a[i] + 1);
      else
        dp[i][j][1] = min(dp[i][j][1], dp[i - 2][j - 1][0]);
      int consider = min(a[i], a[i - 2]);
      if (a[i - 1] >= consider)
        dp[i][j][1] =
            min(dp[i][j][1], dp[i - 2][j - 1][1] + a[i - 1] - consider + 1);
      else
        dp[i][j][1] = min(dp[i][j][1], dp[i - 2][j - 1][1]);
    }
  for (register int i = 1; i <= n / 2 + (n & 1); ++i)
    printf("%d ", min(dp[n][i][0], dp[n][i][1]));
  return 0;
}
