#include <bits/stdc++.h>
using namespace std;
int n, f[2510][3], a[5010];
int main() {
  int i, j;
  cin >> n;
  for (i = 1; i <= n; ++i) {
    cin >> a[i];
  }
  for (j = (n + 1) / 2; j >= 0; --j) {
    for (i = 0; i <= 2; ++i) {
      f[j][i] = 0x3fffffff;
    }
  }
  f[0][0] = f[1][1] = 0;
  for (i = 2; i <= n; ++i) {
    for (j = (i + 1) / 2; j >= 1; --j) {
      f[j][0] = min(f[j][0], f[j][2]);
      f[j][2] = f[j][1] + max(0, a[i] - a[i - 1] + 1);
      f[j][1] =
          min(f[j - 1][0] + max(0, a[i - 1] - a[i] + 1),
              f[j - 1][2] + max(0, min(a[i - 1], a[i - 2] - 1) - a[i] + 1));
    }
  }
  for (j = 1; j <= (n + 1) / 2; ++j) {
    cout << min(f[j][0], min(f[j][1], f[j][2])) << ' ';
  }
  return 0;
}
