#include <bits/stdc++.h>
using namespace std;
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
const int N = 5005, inf = 1e9;
int dp[N][N][2];
void mins(int &x, int y) { x = min(x, y); }
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (int i = 0; i < N; i++) {
    for (int j = 0; j < N; j++) {
      dp[i][j][0] = dp[i][j][1] = inf;
    }
  }
  dp[0][0][0] = 0;
  dp[0][1][1] = 0;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j <= (n + 1) / 2; j++) {
      mins(dp[i + 1][j][0], dp[i][j][0]);
      mins(dp[i + 1][j + 1][1], dp[i][j][0] + max(0, a[i] - a[i + 1] + 1));
      mins(dp[i + 1][j][0], dp[i][j][1] + max(0, a[i + 1] - a[i] + 1));
      mins(dp[i + 2][j + 1][1],
           dp[i][j][1] + max(0, a[i + 1] - min(a[i], a[i + 2]) + 1));
    }
  }
  for (int i = 1; i <= (n + 1) / 2; i++) {
    cout << min(dp[n - 1][i][0], dp[n - 1][i][1]) << " ";
  }
}
