#include <bits/stdc++.h>
using namespace std;
int dp[2505][5005];
int MIN[5005][5005];
int v[5005];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n;
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> v[i];
  }
  for (int i = 1; i <= (n / 2 + n % 2); i++) {
    for (int j = 0; j <= n; j++) {
      dp[i][j] = 1e9;
      MIN[i][j] = 1e9;
    }
  }
  for (int j = 1; j <= n; j++) {
    dp[1][j] = max(0, v[j - 1] - v[j] + 1) + max(0, v[j + 1] - v[j] + 1);
    MIN[1][j] = min(MIN[1][j - 1], dp[1][j]);
  }
  cout << MIN[1][n] << " ";
  for (int i = 2; i <= (n / 2 + n % 2); i++) {
    for (int j = 3; j <= n; j++) {
      dp[i][j] = MIN[i - 1][j - 3] + max(0, v[j - 1] - v[j] + 1);
      dp[i][j] =
          min(dp[i][j], dp[i - 1][j - 2] +
                            max(0, min(v[j - 1], v[j - 2] - 1) - v[j] + 1));
      dp[i][j] += max(0, v[j + 1] - v[j] + 1);
      MIN[i][j] = min(MIN[i][j - 1], dp[i][j]);
    }
    cout << MIN[i][n] << " ";
  }
  return 0;
}
