#include <bits/stdc++.h>
using namespace std;
const long long inff = 0x3f3f3f3f3f3f3f3f;
int n, a[5008], dp[5008][3], qw, ans[5008];
int main() {
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  qw = (n + 1) / 2;
  for (int i(1); i <= (n); ++i) scanf("%d", &a[i]);
  memset(dp, int(0x3f3f3f3f), sizeof(dp)), dp[0][0] = 0;
  for (int i(1); i <= (n); ++i) {
    for (int j(qw); j >= (0); --j) {
      dp[j][0] = min(dp[j][0], dp[j][2]);
      dp[j][2] = dp[j][1];
      if (j) {
        dp[j][1] = dp[j - 1][0] + max(0, a[i - 1] - a[i] + 1) +
                   max(0, a[i + 1] - a[i] + 1);
        if (i >= 2)
          dp[j][1] =
              min(dp[j][1], dp[j - 1][2] + max(0, a[i + 1] - a[i] + 1) +
                                max(0, min(a[i - 1], a[i - 2] - 1) - a[i] + 1));
      }
      ans[j] = min(dp[j][0], dp[j][1]), ans[j] = min(ans[j], dp[j][2]);
    }
  }
  for (int i(1); i <= (qw); ++i) printf("%d ", ans[i]);
  puts("");
  return 0;
}
