#include <bits/stdc++.h>
using namespace std;
const int N = (int)5e3 + 10;
const int inf = (int)2e9;
int dp[N][N][2], arr[N];
int F(int pos, int rem, int nxtHill) {
  if (rem == 0) return 0;
  if (pos <= 0) return inf;
  int &ret = dp[pos][rem][nxtHill];
  if (ret != -1) return ret;
  ret = inf;
  ret = min(ret, F(pos - 1, rem, 0));
  int nxt_height = arr[pos + 1], cost = 0;
  if (nxtHill) nxt_height = min(nxt_height, arr[pos + 2] - 1);
  if (nxt_height >= arr[pos] - 1) cost += nxt_height - arr[pos] + 1;
  if (arr[pos - 1] >= arr[pos] - 1) cost += arr[pos - 1] - arr[pos] + 1;
  ret = min(ret, cost + F(pos - 2, rem - 1, 1));
  return ret;
}
int main() {
  memset(dp, -1, sizeof(dp));
  memset(arr, 0, sizeof(arr));
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &arr[i]);
  }
  for (int i = 1; i <= (n + 1) / 2; i++) {
    printf("%d ", F(n, i, 0));
  }
  return 0;
}
