#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
long long n, nb = 0, m, a[200005], k;
set<long long> st;
string s;
map<long long, long long> red;
vector<pair<long long, pair<long long, long long> > > v1, v2;
long long dp[2][5005][3000];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  long long i, j, x, y;
  cin >> n;
  if (n & 1)
    m = (n / 2) + 1;
  else
    m = n / 2;
  for (i = 1; i <= n; i++) cin >> a[i];
  if (n == 1) {
    cout << "0";
    return 0;
  }
  for (i = 0; i <= n; i++)
    for (j = 0; j <= m; j++) dp[0][i][j] = 1e18, dp[1][i][j] = 1e18;
  a[0] = -5;
  a[n + 1] = -5;
  dp[0][0][0] = 0;
  dp[0][1][0] = 0;
  dp[1][1][1] = 0;
  for (i = 1; i <= n; i++) dp[0][i][0] = 0;
  if (a[2] >= a[1]) dp[1][1][1] = a[2] - a[1] + 1;
  for (i = 2; i <= n; i++) {
    for (j = 1; j <= m; j++) {
      dp[0][i][j] = min(dp[0][i][j], dp[1][i - 1][j]);
      dp[0][i][j] = min(dp[0][i][j], dp[0][i - 1][j]);
      long long cost1 = 0, cost2 = 0;
      if (a[i - 1] >= a[i]) cost1 += a[i - 1] - a[i] + 1;
      if (a[i + 1] >= a[i]) cost2 += a[i + 1] - a[i] + 1;
      dp[1][i][j] = min(dp[1][i][j], dp[0][i - 2][j - 1] + cost2 + cost1);
      long long costi22 = 0;
      if (a[i - 1] >= a[i - 2]) costi22 += a[i - 1] - a[i - 2] + 1;
      long long costi01 = 0;
      costi01 += a[i - 1] - a[i] + 1;
      if (j >= 1)
        dp[1][i][j] = min(dp[1][i][j], dp[1][i - 2][j - 1] + cost2 - costi22 +
                                           max(costi22, costi01));
    }
  }
  for (nb = 1; nb <= m; nb++) {
    long long res = 5e18;
    res = min(res, dp[0][n][nb]);
    res = min(res, dp[1][n][nb]);
    cout << res << " ";
  }
}
