#include <bits/stdc++.h>
using namespace std;
const int N = 5050;
const int INF = 0x3f3f3f3f;
int n, k;
int a[N];
int f[N][N / 2][2];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  k = (n - 1) / 2 + 1;
  memset(f, INF, sizeof(f));
  for (int i = 0; i <= n; i++) f[i][0][0] = 0;
  f[1][1][1] = 0;
  for (int i = 2; i <= n; i++)
    for (int j = 1; j <= k; j++) {
      f[i][j][0] =
          min(f[i - 1][j][0], f[i - 1][j][1] + max(a[i] - a[i - 1] + 1, 0));
      f[i][j][1] =
          min(f[i - 2][j - 1][1] + max(a[i - 1] - min(a[i], a[i - 2]) + 1, 0),
              f[i - 1][j - 1][0] + max(a[i - 1] - a[i] + 1, 0));
    }
  for (int i = 1; i <= k; i++) printf("%d ", min(f[n][i][0], f[n][i][1]));
  return 0;
}
