#include <bits/stdc++.h>
using namespace std;
const int maxn = 5000;
int n, a[maxn + 5], f[maxn + 5][maxn + 5][2];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  memset(f, 63, sizeof(f));
  f[0][0][0] = 0;
  f[1][1][1] = (max((a[2]) - (a[1] - 1), 0));
  for (int i = 0; i < n; i++)
    for (int j = 0; j <= (i + 1 >> 1); j++) {
      f[i + 1][j][0] = min(f[i + 1][j][0], min(f[i][j][0], f[i][j][1]));
      if (i + 1 < n) {
        f[i + 2][j + 1][1] =
            min(f[i + 2][j + 1][1], f[i][j][0] +
                                        (max((a[i + 1]) - (a[i + 2] - 1), 0)) +
                                        (max((a[i + 3]) - (a[i + 2] - 1), 0)));
        f[i + 2][j + 1][1] = min(
            f[i + 2][j + 1][1],
            f[i][j][1] + (max((min(a[i + 1], a[i] - 1)) - (a[i + 2] - 1), 0)) +
                (max((a[i + 3]) - (a[i + 2] - 1), 0)));
      }
    }
  for (int i = 1; i <= (n + 1 >> 1); i++)
    printf("%d", min(f[n][i][0], f[n][i][1])),
        i < (n + 1 >> 1) ? putchar(' ') : puts("");
  return 0;
}
