#include <bits/stdc++.h>
using namespace std;
const long long MOD = 1000000007;
long long n, v[5010], dp[5010][2501][2];
void solve() {
  cin >> n;
  long long k = (n + 1) / 2;
  for (long long i = 0; i < n; ++i) {
    cin >> v[i];
  }
  memset(dp, 63, sizeof dp);
  dp[0][0][0] = 0;
  dp[1][0][0] = 0;
  dp[0][1][1] = max(0ll, v[1] - v[0] + 1);
  dp[1][1][0] = max(0ll, v[1] - v[0] + 1);
  dp[1][1][1] = max(0ll, v[0] - v[1] + 1) + max(0ll, v[2] - v[1] + 1);
  for (long long i = 2; i < n; i++) {
    for (long long j = 0; j <= k; j++) {
      dp[i][j][0] = min({dp[i][j][0], dp[i - 1][j][0], dp[i - 1][j][1]});
    }
    for (long long j = 1; j <= k; j++) {
      long long a = dp[i - 2][j - 1][0], b = dp[i - 2][j - 1][1];
      a += max(v[i - 1] - v[i] + 1, 0ll);
      if (i != n - 1) a += max(v[i + 1] - v[i] + 1, 0ll);
      b += max(min(v[i - 1], v[i - 2] - 1) - v[i] + 1, 0ll);
      if (i != n - 1) b += max(v[i + 1] - v[i] + 1, 0ll);
      dp[i][j][1] = min(dp[i][j][1], min(a, b));
    }
  }
  for (long long i = 1; i <= k; i++) {
    cout << min(dp[n - 1][i][0], dp[n - 1][i][1]) << " ";
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  long long t = 1;
  while (t--) solve();
  return 0;
}
