#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265358979323846264338327950288419716939937510;
const double E = 2.7182818284590452353602874713526624977572470936999596;
const double eps = 0.000000001;
const int MOD = 1e9 + 7;
inline long long max(long long x, long long y) { return x > y ? x : y; }
inline int min(int x, int y) { return x < y ? x : y; }
inline int gcd(int x, int y) { return y ? gcd(y, x % y) : x; }
template <typename T>
inline void read(T& x) {
  char id;
  x = 0;
  bool flag = false;
  id = getchar();
  while (id > '9' || id < '0') {
    if (id == '-') flag = true;
    id = getchar();
  }
  while ((id <= '9' && id >= '0')) {
    x = x * 10 + id - '0';
    id = getchar();
  }
  if (flag) x *= -1;
}
template <typename T>
inline void read(T& x, T& y) {
  read(x);
  read(y);
}
template <typename T>
inline void read(T& x, T& y, T& z) {
  read(x);
  read(y);
  read(z);
}
int h[5100], ans[5100], dp[5100][5100];
int main() {
  int n;
  read(n);
  for (int i = (1); (i) <= (n); (i)++) read(h[i]);
  for (int i = (0); (i) <= (n); (i)++)
    for (int j = (1); (j) <= (n); (j)++) dp[i][j] = 0x3f3f3f3f;
  for (int i = (1); (i) <= (n); (i)++) {
    if ((h[i + 1] - h[i]) < 0)
      dp[i][1] = 0;
    else
      dp[i][1] = h[i + 1] - h[i] + 1;
    if ((h[i - 1] - h[i]) >= 0) dp[i][1] += h[i - 1] - h[i] + 1;
  }
  for (int j = (2); (j) <= ((n + 1) >> 1); (j)++) {
    int minn = 0x3f3f3f3f;
    for (int i = (1); (i) <= (n); (i)++) {
      if (i >= 3) minn = min(minn, dp[i - 3][j - 1]);
      int tmp1 = minn, tmp2;
      if (h[i + 1] - h[i] >= 0) tmp1 += h[i + 1] - h[i] + 1;
      if (h[i - 1] - h[i] >= 0) tmp1 += h[i - 1] - h[i] + 1;
      if (i >= 2) {
        tmp2 = dp[i - 2][j - 1];
        if (h[i + 1] - h[i] >= 0) tmp2 += h[i + 1] - h[i] + 1;
        if ((min(h[i - 1], h[i - 2] - 1) - h[i]) >= 0)
          tmp2 += min(h[i - 1], h[i - 2] - 1) - h[i] + 1;
      } else
        tmp2 = 0x3f3f3f3f;
      dp[i][j] = min(tmp1, tmp2);
    }
  }
  ans[(n + 3) >> 1] = 0x3f3f3f3f;
  for (int i = ((n + 1) >> 1); (i) >= (1); (i)--) {
    ans[i] = ans[i + 1];
    for (int j = (1); (j) <= (n); (j)++) ans[i] = min(ans[i], dp[j][i]);
  }
  for (int i = (1); (i) <= ((n + 1) >> 1); (i)++) printf("%d ", ans[i]);
  return 0;
}
