#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5005, INF = 1e9;
int n;
int x[MAXN], ans[MAXN];
int f[MAXN][MAXN >> 1][2];
int main() {
  scanf("%d", &n);
  for (int i = 1; i <= n; ++i) scanf("%d", &x[i]);
  for (int i = 0; i <= n; ++i)
    for (int j = 1; j <= n + 1 >> 1; ++j) f[i][j][0] = f[i][j][1] = INF;
  for (int i = 1; i <= n; ++i) ans[i] = INF;
  for (int i = 1; i <= n; ++i) {
    f[i][1][0] =
        x[i - 1] + x[i + 1] - min(x[i - 1], x[i] - 1) - min(x[i + 1], x[i] - 1);
    f[i][1][1] = min(f[i - 1][1][1], f[i - 1][1][0]);
    ans[1] = min(ans[1], f[i][1][0]);
  }
  for (int i = 2; i <= n + 1 >> 1; ++i)
    for (int j = (i << 1) - 1; j <= n; ++j) {
      f[j][i][0] = min(
          f[j - 2][i - 1][1] + x[j - 1] + x[j + 1] - min(x[j - 1], x[j] - 1) -
              min(x[j + 1], x[j] - 1),
          f[j - 2][i - 1][0] +
              max(min(x[j - 1], x[j - 2] - 1) - min(x[j - 1], x[j] - 1), 0) +
              x[j + 1] - min(x[j + 1], x[j] - 1));
      f[j][i][1] = min(f[j - 1][i][1], f[j - 1][i][0]);
      ans[i] = min(ans[i], f[j][i][0]);
    }
  for (int i = 1; i <= n + 1 >> 1; ++i) printf("%d ", ans[i]);
  return 0;
}
