#include <bits/stdc++.h>
using namespace std;
template <class C>
void mini(C &a4, C b4) {
  a4 = min(a4, b4);
}
template <class C>
void maxi(C &a4, C b4) {
  a4 = max(a4, b4);
}
template <class TH>
void _dbg(const char *sdbg, TH h) {
  cerr << sdbg << "=" << h << "\n";
}
template <class TH, class... TA>
void _dbg(const char *sdbg, TH h, TA... a) {
  while (*sdbg != ',') cerr << *sdbg++;
  cerr << "=" << h << ",";
  _dbg(sdbg + 1, a...);
}
template <class T>
ostream &operator<<(ostream &os, vector<T> V) {
  os << "[";
  for (auto vv : V) os << vv << ",";
  return os << "]";
}
template <class L, class R>
ostream &operator<<(ostream &os, pair<L, R> P) {
  return os << "(" << P.first << "," << P.second << ")";
}
long long level(long long s, long long t) { return max(0LL, s - (t - 1)); }
long long level(long long s, long long t, long long u) {
  return max({0LL, s - (t - 1), s - (u - 1)});
}
int32_t main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout << fixed << setprecision(11);
  if (0) cout << fixed << setprecision(6);
  long long n;
  cin >> n;
  vector<long long> h(n);
  for (long long i = (0); i <= ((long long)(n)-1); i++) {
    cin >> h[i];
  }
  long long tn = (n + 1) / 2 + 1;
  vector<vector<long long> > dyn(3, vector<long long>(tn, (LLONG_MAX / 2)));
  enum { NONE, PREV_LESS, NEXT_LESS };
  dyn[PREV_LESS][0] = 0;
  dyn[NONE][0] = 0;
  for (long long i = (0); i <= ((long long)(n)-1); i++) {
    vector<vector<long long> > ndyn(3, vector<long long>(tn, (LLONG_MAX / 2)));
    (i);
    (dyn);
    for (long long j = (0); j <= ((long long)(tn)-1); j++) {
      mini(ndyn[NONE][j], dyn[NONE][j]);
      if (i != n - 1) {
        mini(ndyn[PREV_LESS][j], level(h[i], h[i + 1]) + dyn[NONE][j]);
      }
      if (i != 0)
        mini(ndyn[NONE][j], level(h[i], h[i - 1]) + dyn[NEXT_LESS][j]);
      if (i != 0 && i != n - 1) {
        mini(ndyn[PREV_LESS][j],
             level(h[i], h[i - 1], h[i + 1]) + dyn[NEXT_LESS][j]);
      }
      if (j != tn - 1) mini(ndyn[NEXT_LESS][j + 1], dyn[PREV_LESS][j]);
    }
    dyn = move(ndyn);
  }
  for (long long ti = (0); ti <= ((long long)((n + 1) / 2) - 1); ti++) {
    long long i = ti + 1;
    cout << min({dyn[0][i], dyn[1][i], dyn[2][i]}) << " ";
  }
  cout << "\n";
}
