#include <bits/stdc++.h>
using namespace std;
long long a[5005];
long long dp[5005][4];
int main() {
  long long n;
  cin >> n;
  for (long i = 1; i <= n; i++) {
    cin >> a[i];
  }
  a[0] = 1;
  for (long i = (n + 1) / 2; i >= 0; i--) {
    for (long j = 0; j <= 2; j++) {
      dp[i][j] = 10000000000000;
    }
  }
  dp[0][0] = dp[1][1] = 0;
  for (long i = 2; i <= n; ++i) {
    for (long j = (i + 1) / 2; j >= 1; --j) {
      dp[j][0] = min(dp[j][0], dp[j][2]);
      dp[j][2] = dp[j][1] + max(0ll, a[i] - a[i - 1] + 1);
      dp[j][1] =
          min(dp[j - 1][0] + max(0ll, a[i - 1] - a[i] + 1),
              dp[j - 1][2] + max(0ll, min(a[i - 1], a[i - 2] - 1) - a[i] + 1));
    }
  }
  for (long i = 1; i <= (n + 1) / 2; i++) {
    cout << min(dp[i][0], min(dp[i][1], dp[i][2])) << " ";
  }
}
