#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC target("avx,avx2,fma")
#pragma GCC optimization("unroll-loops")
const long double pi = 2 * acos(0.0);
using namespace std;
long long int power(long long int a, long long int n) {
  if (n == 0) {
    return 1;
  }
  long long int p = power(a, n / 2) % 1000000007;
  p = (p * p) % 1000000007;
  if (n % 2 == 1) {
    p = (p * a) % 1000000007;
  }
  return p;
}
long long int gcd(long long int a, long long int b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
const int N = 1e6 + 5;
vector<long long int> sieve(N, 0);
void si() {
  sieve[1] = 1;
  for (int i = 2; i < N; i++) {
    if (sieve[i] == 0) {
      sieve[i] = i;
      for (int j = 2 * i; j < N; j += i) {
        sieve[j] = i;
      }
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  ;
  int n;
  cin >> n;
  if (n == 1) {
    cout << 0 << "\n";
    return 0;
  }
  vector<long long int> a(n + 1);
  ;
  for (long long int i = 0; i < n; i++) cin >> a[i];
  ;
  a[n] = 0;
  long long int k = (n + 1) / 2;
  long long int dp[n + 1][k + 1][2];
  for (int i = 0; i <= n; i++) {
    for (int j = 0; j <= k; j++) {
      dp[i][j][0] = 1e18;
      dp[i][j][1] = 1e18;
    }
  }
  dp[1][0][0] = 0;
  dp[1][1][1] = a[1] - min(a[0] - 1, a[1]);
  for (int i = 0; i <= n; i++) {
    dp[i][0][0] = 0;
  }
  vector<long long int> ans(k, 1e18);
  for (int i = 2; i <= n; i++) {
    for (int j = 1; j <= k; j++) {
      dp[i][j][0] = min(dp[i - 1][j][0], dp[i - 1][j][1]);
      long long int z = 1e18;
      if (i - 3 >= 0) {
        z = dp[i - 2][j - 1][1];
        if (a[i - 3] > a[i - 1]) {
          z += a[i - 3] - a[i - 1];
        }
        z += a[i] - min(a[i], a[i - 1] - 1);
      }
      dp[i][j][1] = min(dp[i - 1][j - 1][0] + a[i] - min(a[i], a[i - 1] - 1) +
                            a[i - 2] - min(a[i - 2], a[i - 1] - 1),
                        z);
      dp[i][j][1] = min(dp[i][j][1], (long long int)(1e18));
      ans[j - 1] = min(ans[j - 1], dp[i][j][1]);
      ans[j - 1] = min(ans[j - 1], dp[i][j][0]);
    }
  };
  for (long long int i = 0; i < k; i++) cout << ans[i] << " ";
  ;
  cout << "\n";
  return 0;
}
