#include <bits/stdc++.h>
using namespace std;
const int maxn = 5010, inf = 0x7ffffff;
int n, a[maxn], f[maxn][2600][2];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  memset(f, 127 / 3, sizeof(f));
  for (int i = 0; i <= n; i++) f[i][0][0] = 0;
  for (int i = 1; i <= n; i++)
    for (int j = 1; j <= min(i, (n + 1) / 2); j++) {
      f[i][j][0] = min(f[i - 1][j][0], f[i - 1][j][1]);
      if (i == 1)
        f[i][j][1] = max(0, a[2] - a[1] + 1);
      else
        f[i][j][1] = min(f[i - 2][j - 1][0] + max(0, a[i - 1] - a[i] + 1),
                         f[i - 2][j - 1][1] +
                             max(0, min(a[i - 2] - 1, a[i - 1]) - a[i] + 1)) +
                     max(0, a[i + 1] - a[i] + 1);
    }
  for (int i = 1; i <= (n + 1) / 2; i++)
    printf("%d ", min(f[n][i][0], f[n][i][1]));
  return 0;
}
