#include <bits/stdc++.h>
#pragma optimize("-O3")
using namespace std;
class solver {
 public:
  vector<vector<int> > f, pre_mini;
  vector<int> a;
  int n;
  solver(int n)
      : n(n),
        f(n + 3, vector<int>(2, 0)),
        pre_mini(n + 3, vector<int>(2, 0)),
        a(n + 3){};
  void solve() {
    for (int i = 1; i <= n; ++i) cin >> a[i];
    int kk = n + 1;
    kk >>= 1;
    vector<int> ans;
    const int inf = static_cast<int>(1e9);
    for (int j = 1; j <= kk; ++j) {
      int used = j & 1, temp = used ^ 1;
      pre_mini[j * 2 - 2][used] = inf;
      int bb = j << 1;
      --bb;
      for (int i = bb; i <= n; ++i) {
        f[i][used] = max(0, a[i - 1] - a[i] + 1);
        if (j > 1) {
          int tmp =
              f[i - 2][temp] + max(0, min(a[i] - 1, a[i - 1]) - a[i - 2] + 1);
          tmp = min(tmp, pre_mini[i - 3][temp]);
          f[i][used] += tmp;
        }
        pre_mini[i][used] = min(f[i][used] + max(0, a[i + 1] - a[i] + 1),
                                pre_mini[i - 1][used]);
      }
      ans.push_back(pre_mini[n][used]);
    }
    for (const int &x : ans) printf("%d ", x);
    puts("");
  }
};
int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cin.tie(nullptr);
  int n;
  cin >> n;
  (new solver(n))->solve();
  return 0;
}
