#include <bits/stdc++.h>
long long int mod = 998244353;
long long int inf = 1000000000000000000;
using namespace std;
long long int dp[5002][5002], a[5002];
void fills() {
  for (int i = 1; i < 5001; i++) {
    for (int j = 1; j < 5001; j++) {
      dp[i][j] = inf;
    }
  }
}
int main() {
  iostream::sync_with_stdio(false);
  cin.tie(0);
  int n;
  cin >> n;
  fills();
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= n; i++)
    dp[1][i] = max(0LL, a[i - 1] - a[i] + 1) + max(0LL, a[i + 1] - a[i] + 1);
  for (int i = 2; i <= (n + 1) / 2; i++) {
    long long int getu = inf;
    for (int j = (i - 1) * 2 + 1; j <= n; j++) {
      dp[i][j] = dp[i - 1][j - 2] + max(0LL, a[j + 1] - a[j] + 1) +
                 max(0LL, min(a[j - 2] - 1, a[j - 1]) - a[j] + 1);
      if (j > (i - 1) * 2 + 1)
        getu = min(getu, dp[i - 1][j - 3]),
        dp[i][j] = min(getu + max(0LL, a[j - 1] - a[j] + 1) +
                           max(0LL, a[j + 1] - a[j] + 1),
                       dp[i][j]);
    }
  }
  for (int i = 1; i <= (n + 1) / 2; i++) {
    long long int maxs = dp[i][(i - 1) * 2 + 1];
    for (int j = i * 2; j <= n; j++) maxs = min(dp[i][j], maxs);
    cout << maxs << " ";
  }
}
