#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const int M = 5005;
int cal(int x, int y) { return max(0, x - y + 1); }
int f[M][M][2], h[M], n;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) {
    cin >> h[i];
  }
  memset(f, inf, sizeof(f));
  f[1][1][1] = 0;
  f[1][0][0] = 0;
  f[2][0][0] = 0;
  f[2][1][0] = cal(h[2], h[1]);
  f[2][1][1] = cal(h[1], h[2]);
  for (int i = 3; i <= n; i++) {
    f[i][0][0] = 0;
    for (int j = 1; j <= i; j++) {
      f[i][j][0] = min(f[i - 1][j][0], f[i - 1][j][1] + cal(h[i], h[i - 1]));
      f[i][j][1] = min(f[i - 2][j - 1][0] + cal(h[i - 1], h[i]),
                       f[i - 2][j - 1][1] +
                           max(cal(h[i - 1], h[i]), cal(h[i - 1], h[i - 2])));
      if (j * 2 >= i) break;
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << min(f[n][i][0], f[n][i][1]) << " ";
    if (i * 2 >= n) break;
  }
  return 0;
}
