#include <bits/stdc++.h>
using namespace std;
const int N = 5005;
int n, a[N], x;
long long f[N][N >> 1][3], ans;
bool bz;
void R(int &n) {
  char c;
  for (n = 0; (c = getchar()) < '0' || c > '9';)
    ;
  for (; c <= '9' && c >= '0'; c = getchar()) n = n * 10 + c - 48;
}
int main() {
  R(n);
  for (int i = 0, E = n; i <= E; i++)
    for (int j = 0, E = i + 1 >> 1; j <= E; j++)
      f[i][j][0] = f[i][j][1] = f[i][j][2] = 1e18;
  f[0][0][0] = 0;
  for (int i = 1, E = n; i <= E; i++) {
    R(a[i]);
    for (int j = 0, E = i >> 1; j <= E; j++) {
      if (f[i - 1][j][0] < 1e18) {
        f[i][j][0] =
            (f[i][j][0] < f[i - 1][j][0] ? f[i][j][0] : f[i - 1][j][0]);
        x = a[i - 1] - (a[i] - 1 < a[i - 1] ? a[i] - 1 : a[i - 1]);
        f[i][j + 1][1] =
            (f[i][j + 1][1] < f[i - 1][j][0] + x ? f[i][j + 1][1]
                                                 : f[i - 1][j][0] + x);
      }
      if (f[i - 1][j][1] < 1e18) {
        x = a[i] - (a[i - 1] - 1 < a[i] ? a[i - 1] - 1 : a[i]);
        f[i][j][2] =
            (f[i][j][2] < f[i - 1][j][1] + x ? f[i][j][2] : f[i - 1][j][1] + x);
      }
      if (f[i - 1][j][2] < 1e18) {
        f[i][j][0] =
            (f[i][j][0] < f[i - 1][j][2] ? f[i][j][0] : f[i - 1][j][2]);
        x = (a[i - 2] - 1 < a[i - 1] ? a[i - 2] - 1 : a[i - 1]);
        x = x - (x < a[i] - 1 ? x : a[i] - 1);
        f[i][j + 1][1] =
            (f[i][j + 1][1] < f[i - 1][j][2] + x ? f[i][j + 1][1]
                                                 : f[i - 1][j][2] + x);
      }
    }
  }
  for (int i = 1, E = n + 1 >> 1; i <= E; i++) {
    ans = (f[n][i][0] < f[n][i][1] ? f[n][i][0] : f[n][i][1]);
    ans = (ans < f[n][i][2] ? ans : f[n][i][2]);
    printf("%I64d ", ans);
  }
}
