#include <bits/stdc++.h>
using namespace std;
const int N = 5e3 + 10;
void Upmin(int &x, int y) {
  if (x > y) x = y;
}
int dp[N][N][2];
int a[N], n;
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  memset(dp, 127, sizeof dp);
  dp[0][0][0] = 0;
  for (int i = 1; i <= n; i++) dp[i][0][0] = 0;
  dp[1][0][0] = 0;
  dp[1][1][1] = 0;
  a[0] = 100000;
  for (int i = 2; i <= n; i++)
    for (int j = 1; j <= (i + 1) / 2; j++) {
      Upmin(dp[i][j][0], dp[i - 1][j][0]);
      Upmin(dp[i][j][0], dp[i - 1][j][1] + max(0, a[i] - a[i - 1] + 1));
      Upmin(dp[i][j][1], dp[i - 2][j - 1][0] + max(0, a[i - 1] - a[i] + 1));
      Upmin(dp[i][j][1],
            dp[i - 2][j - 1][1] + max(0, a[i - 1] - min(a[i], a[i - 2]) + 1));
    }
  for (int i = 1; i <= (n + 1) / 2; i++)
    printf("%d ", min(dp[n][i][0], dp[n][i][1]));
  puts("");
  return 0;
}
