#include <bits/stdc++.h>
using namespace std;
int arr[5000 + 5];
const int INF = 1000000000;
int n;
int dp[5000 + 5][5000 / 2 + 5][2];
int F(int pos, int rem, bool nxtHillFlag) {
  if (!rem) return 0;
  if (pos <= 0) return INF;
  if (dp[pos][rem][nxtHillFlag] != -1) return dp[pos][rem][nxtHillFlag];
  int ret = F(pos - 1, rem, false);
  int next_height = arr[pos + 1];
  if (nxtHillFlag) next_height = min(next_height, arr[pos + 2] - 1);
  int hill_cost = 0;
  if (next_height >= arr[pos] - 1) hill_cost += next_height - (arr[pos] - 1);
  if (arr[pos - 1] >= arr[pos] - 1) hill_cost += arr[pos - 1] - (arr[pos] - 1);
  ret = min(ret, hill_cost + F(pos - 2, rem - 1, true));
  return dp[pos][rem][nxtHillFlag] = ret;
}
int main() {
  memset(dp, -1, sizeof(dp));
  int i;
  scanf("%d", &n);
  for (i = 1; i <= n; i++) scanf("%d", &arr[i]);
  for (i = 1; i <= (n + 1) / 2; i++) printf("%d ", F(n, i, false));
  return 0;
}
