#include <bits/stdc++.h>
using namespace std;
const int NMAX = 5005;
int dp[NMAX][NMAX][2], v[NMAX], n, house();
int house(int i, int loss = 0) {
  if (i == 1) return max(0, v[2] - v[1] + 1);
  if (i == n) return max(0, v[n - 1] - loss - v[n] + 1);
  return (max(0, v[i - 1] - loss - v[i] + 1) + max(0, v[i + 1] - v[i] + 1));
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> v[i];
  for (int i = 0; i <= (n / 2) + (n % 2 == 1); i++)
    for (int j = 0; j <= n; j++) dp[i][j][0] = dp[i][j][1] = INT_MAX;
  dp[1][1][1] = house(1);
  for (int i = 0; i <= n; i++) dp[0][i][0] = 0;
  for (int i = 1; i <= (n / 2) + (n % 2 == 1); i++) {
    for (int j = max(2 * i - 1, 2); j <= n; j++) {
      dp[i][j][0] = min(dp[i][j - 1][0], dp[i][j - 1][1]);
      if (dp[i - 1][j - 2][0] != INT_MAX)
        dp[i][j][1] = dp[i - 1][j - 2][0] + house(j);
      if (j > 2 && dp[i - 1][j - 2][1] != INT_MAX) {
        int dif = max(0, v[j - 1] - v[j - 2] + 1);
        dp[i][j][1] = min(dp[i][j][1], dp[i - 1][j - 2][1] + house(j, dif));
      }
    }
    int sol = INT_MAX;
    for (int j = 1; j <= n; j++) sol = min(sol, min(dp[i][j][0], dp[i][j][1]));
    cout << sol << " ";
  }
  return 0;
}
