#include <bits/stdc++.h>
using namespace std;
const int INF = (int)1E9;
const double INFD = 1E9;
const long long INFLL = (long long)1E15;
const long long MOD = (long long)1E9 + 7;
const long double PI = acos(-1);
const long double EPS = 1E-9;
bool between(int x, int l, int r) { return (l <= x && x <= r); }
string tostring(int x) {
  char dum[20];
  sprintf(dum, "%d", x);
  string ret(dum);
  return ret;
}
inline void work(int kasus) {}
long long DP[5010][2600][2];
long long A[5010];
int n;
long long f(int cur, int sisa, bool pake) {
  if (sisa <= 0) return 0;
  if (cur > n) return INFLL;
  long long &ret = DP[cur][sisa][pake];
  if (ret != -1) return ret;
  ret = INFLL;
  ret = min(ret, f(cur + 1, sisa, false));
  if (cur + 1 <= n) {
    long long cost = 0;
    long long kiri = A[cur];
    if (pake) kiri = min(A[cur - 1] - 1, kiri);
    if (A[cur + 1] <= kiri) cost += kiri - A[cur + 1] + 1;
    if (A[cur + 1] <= A[cur + 2]) cost += A[cur + 2] - A[cur + 1] + 1;
    ret = min(ret, f(cur + 2, sisa - 1, true) + cost);
  }
  return ret;
}
int main() {
  scanf("%d", &n);
  for (int i = 1; i < n + 1; i += 1) scanf("%d", A + i);
  A[0] = A[n + 1] = 0;
  memset(DP, -1, sizeof DP);
  int atas = n / 2;
  if (n & 1) atas++;
  for (int i = 1; i < atas + 1; i += 1) {
    if (i != 1) printf(" ");
    printf("%lld", f(0, i, false));
  }
  puts("");
  return 0;
}
