#include <bits/stdc++.h>
using namespace std;
const int N = 5002;
int cur[N][2], last[N][2];
int n, a[N];
int dp[N][N / 2][2];
int rec(int i, int cnt, bool last) {
  if (i > n) return cnt == 0 ? 0 : 1e9;
  if (dp[i][cnt][last] != -1) return dp[i][cnt][last];
  int ans = rec(i + 1, cnt, 0);
  if (!last) {
    ans = min(ans, max(0, a[i - 1] - a[i] + 1) + max(0, a[i + 1] - a[i] + 1) +
                       rec(i + 2, cnt - 1, 1));
  } else {
    int prev = min(a[i - 1], a[i - 2] - 1);
    ans = min(ans, max(0, prev - a[i] + 1) + max(0, a[i + 1] - a[i] + 1) +
                       rec(i + 2, cnt - 1, 1));
  }
  return dp[i][cnt][last] = ans;
}
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  a[0] = a[n + 1] = 0;
  memset(dp, -1, sizeof(dp));
  for (int i = 1; i <= (int)ceil(n / 2.0); i++) cout << rec(1, i, 0) << " ";
}
