#include <bits/stdc++.h>
using namespace std;
long long n, dp[5005][2505][2], a[5005];
long long solve(int i, int rem, bool b) {
  if (i > n) return (rem > 0) * 1e12;
  if (rem == 0) return dp[i][rem][b] = 0;
  if (dp[i][rem][b] != -1) return dp[i][rem][b];
  long long pre = a[i - 1], nxt = a[i + 1], ans = 1e18, tmp;
  if (b) pre = min(a[i - 1], a[i - 2] - 1);
  tmp = max((long long)0, pre - (a[i] - 1));
  tmp += max((long long)0, nxt - (a[i] - 1));
  ans = tmp + solve(i + 2, rem - 1, 1);
  ans = min(ans, solve(i + 1, rem, 0));
  return dp[i][rem][b] = ans;
}
int main() {
  memset(dp, -1, sizeof(dp));
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int i = 1; i <= (n / 2 + n % 2); i++) {
    cout << solve(1, i, 0) << " ";
  }
  cout << "\n";
  return 0;
}
