#include <bits/stdc++.h>
using namespace std;
int n;
int f[2501][3];
int a[5001];
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) cin >> a[i];
  for (int j = 0; j <= (n + 1) / 2; j++)
    for (int k = 0; k <= 2; k++) f[j][k] = 0x3f3f3f3f;
  f[0][0] = f[1][1] = 0;
  for (int i = 2; i <= n; i++)
    for (int j = (i + 1) / 2; j >= 1; j--) {
      f[j][2] = f[j][1] + max(0, a[i] - a[i - 1] + 1);
      f[j][0] = min(f[j][0], f[j][2]);
      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 (int i = 1; i <= (n + 1) / 2; i++)
    printf("%d ", min(f[i][0], min(f[i][1], f[i][2])));
}
