#include <bits/stdc++.h>
using namespace std;
const int M = 10e8 + 7;
int n, a[5005];
long long int dp[5005][2505][2];
long long int calc(int n, int k, int next, int b) {
  if (k == 0) return 0;
  if (n < k) return LLONG_MAX;
  if (dp[n][k][b] == -1) {
    int cost = 0;
    if (n == 1)
      cost = 0;
    else if (a[n - 1] >= a[n]) {
      cost = a[n - 1] - a[n] + 1;
    }
    if (next >= a[n]) cost += next - a[n] + 1;
    long long int t1 =
        calc(n - 2, k - 1, (a[n - 1] >= a[n] ? a[n] - 1 : a[n - 1]), 1);
    if (t1 == LLONG_MAX)
      t1 = LLONG_MAX;
    else {
      t1 += cost;
    }
    long long int t2 = calc(n - 1, k, a[n], 0);
    dp[n][k][b] = min(t1, t2);
  }
  return dp[n][k][b];
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n;
  memset(dp, -1, sizeof(dp));
  a[0] = 0;
  a[n + 1] = 0;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
  }
  int k = n / 2 + n % 2;
  for (int i = 1; i <= k; ++i) {
    cout << calc(n, i, 0, 0) << " ";
  }
  return 0;
}
