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