#include <bits/stdc++.h>
using namespace std;
const long long N = 5000 + 10;
long long a[N];
long long dp[N >> 1][N];
long long f(long long i) {
  long long maxn = max(a[i - 1], a[i + 1]);
  long long minn = min(a[i - 1], a[i + 1]);
  if (a[i] > maxn)
    return 0;
  else if (minn < a[i] && a[i] <= maxn)
    return maxn - a[i] + 1;
  else
    return maxn + minn - a[i] * 2 + 2;
}
int32_t main() {
  long long n;
  scanf("%lld", &n);
  memset(dp, 0x3f, sizeof(dp));
  memset(dp[0], 0, sizeof(dp[0]));
  for (long long i = 1; i <= n; i++) scanf("%lld", a + i);
  long long ans = INT_MAX;
  for (long long i = 1; i <= n; i++) {
    dp[1][i] = f(i);
    if (dp[1][i] < ans) ans = dp[1][i];
  }
  printf("%lld ", ans);
  for (long long i = 2; i <= (n + 1) / 2; i++) {
    ans = INT_MAX;
    long long minn = INT_MAX;
    for (long long k = 2 * i - 3; k < i * 2 - 3; k++)
      minn = min(minn, dp[i - 1][k]);
    for (long long j = i * 2 - 1; j <= n; j++) {
      dp[i][j] = minn + dp[1][j];
      long long tmp = min(a[j - 1], a[j - 2] - 1);
      dp[i][j] =
          min(dp[i][j], dp[i - 1][j - 2] + (a[j] > tmp ? 0 : tmp - a[j] + 1) +
                            (a[j] > a[j + 1] ? 0 : a[j + 1] - a[j] + 1));
      if (dp[i][j] < ans) ans = dp[i][j];
      minn = min(minn, dp[i - 1][j - 2]);
    }
    printf("%lld ", ans);
  }
  printf("\n");
  return 0;
}
