#include <bits/stdc++.h>
using namespace std;
const int MXN = 5010, inf = 1e8;
int n, a[MXN], f[MXN >> 1][MXN][2];
int main() {
  cin >> n;
  a[0] = a[n + 1] = -inf;
  for (int i = 1; i <= n; ++i) cin >> a[i];
  memset(f, 0xf, sizeof(f));
  for (int i = 0; i <= n + 1; ++i) f[0][i][0] = 0;
  f[1][1][1] = 0;
  for (int k = 1; k <= (n + 1) >> 1; ++k) {
    for (int i = 2; i <= n + 1; ++i) {
      f[k][i][1] =
          min(f[k - 1][i - 2][1] + max(0, a[i - 1] - min(a[i - 2], a[i]) + 1),
              f[k - 1][i - 2][0] + max(0, a[i - 1] - a[i] + 1));
      f[k][i][0] =
          min(f[k][i - 1][1] + max(0, a[i] - a[i - 1] + 1), f[k][i - 1][0]);
    }
    printf("%d ", f[k][n + 1][0]);
  }
  return 0;
}
