#include <bits/stdc++.h>
using namespace std;
const int N = 5004, oo = 1e9;
int n, a[N];
void minimize(int &a, int b) { a = min(a, b); }
int cost(int a, int b) { return (a > b) ? 0 : (b - a + 1); }
int dp[N][N], best[N][N];
void sol() {
  for (int i = 0; i < (int)N; ++i)
    for (int j = 0; j < (int)N / 2; ++j) dp[i][j] = best[i][j] = oo;
  for (int i = 1; i <= n; ++i) {
    dp[i][0] = 0;
    dp[i][1] = cost(a[i], a[i - 1]) + cost(a[i], a[i + 1]);
    best[i][1] = min(best[i - 1][1], dp[i][1]);
  }
  for (int i = 2; i <= n; ++i) {
    for (int j = 2; j <= (i + 1) / 2; ++j) {
      if (i > 2) {
        int nVal = (a[i - 1] < a[i - 2]) ? a[i - 1]
                                         : a[i - 1] - cost(a[i - 2], a[i - 1]);
        minimize(dp[i][j],
                 dp[i - 2][j - 1] + cost(a[i], a[i + 1]) + cost(a[i], nVal));
      }
      if (i > 3)
        minimize(dp[i][j], best[i - 3][j - 1] + cost(a[i], a[i - 1]) +
                               cost(a[i], a[i + 1]));
    }
    for (int j = 2; j <= (i + 1) / 2; ++j)
      best[i][j] = min(best[i - 1][j], dp[i][j]);
  }
  for (int i = 1; i <= (n + 1) / 2; ++i) cout << best[n][i] << ' ';
  cout << '\n';
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  if (fopen("input.txt", "r")) freopen("input.txt", "r", stdin);
  cin >> n;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  a[0] = a[n + 1] = -oo;
  sol();
  return 0;
}
