#include <bits/stdc++.h>
using namespace std;
int n;
int a[5010];
long long dp[2][2501][5001];
long long solve(bool prevType, int to_make, int i) {
  if (to_make <= 0) return 0;
  if (i > n) return 1e18;
  if (dp[prevType][to_make][i] != -1) return dp[prevType][to_make][i];
  long long ret = solve(0, to_make, i + 1);
  if (a[i - 1] < a[i] && a[i] > a[i + 1])
    ret = min(ret, solve(1, to_make - 1, i + 2));
  else {
    int v = 0;
    int temp = a[i + 1];
    if (a[i] <= a[i - 1]) v += a[i - 1] - a[i] + 1;
    if (a[i] <= a[i + 1]) {
      v += a[i + 1] - a[i] + 1;
      a[i + 1] = a[i] - 1;
    }
    ret = min(ret, v + solve(1, to_make - 1, i + 2));
    a[i + 1] = temp;
  }
  return dp[prevType][to_make][i] = ret;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  memset(dp, -1, sizeof dp);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  a[0] = -1e9;
  a[n + 1] = -1e9;
  a[n + 2] = -1e9;
  for (int i = 1; i <= ceil(n / 2.0); i++)
    cout << solve(0, i, 1) << " \n"[i == ceil(n / 2.0)];
  return 0;
}
