#include <bits/stdc++.h>
using namespace std;
const int N = 5e3 + 5;
int dp[3][N / 2], a[N], ans[N / 2];
int main() {
  int n;
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  memset(dp, 0x3f, sizeof dp);
  memset(ans, 0x3f, sizeof ans);
  int ptr = 0;
  for (int i = 1; i <= n; i++, ptr = (ptr + 1) % 3) {
    int cost = ((i > 1 && a[i] <= a[i - 1]) ? (a[i - 1] - a[i] + 1) : 0) +
               ((i < n && a[i] <= a[i + 1]) ? (a[i + 1] - a[i] + 1) : 0);
    int preCost = i > 2 && a[i - 2] <= a[i - 1]
                      ? ((a[i] < a[i - 2] ? a[i - 2] - a[i] : 0) +
                         (i < n && a[i] <= a[i + 1] ? a[i + 1] - a[i] + 1 : 0))
                      : cost;
    ans[1] = min(ans[1], dp[ptr][1]);
    dp[ptr][1] = cost;
    for (int k = 2; k <= (i + 1) / 2; k++) {
      ans[k] = min(ans[k], dp[ptr][k]);
      dp[ptr][k] = min(ans[k - 1] + cost, dp[(ptr + 1) % 3][k - 1] + preCost);
    }
  }
  for (int i = 0; i < 3; i++)
    for (int k = 1; k <= (n + 1) / 2; k++) ans[k] = min(ans[k], dp[i][k]);
  for (int i = 1; i <= (n + 1) / 2; i++)
    printf("%d%c", ans[i], i == (n + 1) / 2 ? '\n' : ' ');
  return 0;
}
