#include <bits/stdc++.h>
using namespace std;
const long long MOD = (long long)1e9 + 7;
const int inf = (int)1e9 + 7;
const double eps = 1e-7;
const double pi = 3.14159265359;
const int N = 5e3;
int n, a[N], max_cnt;
pair<int, int> dp[N + 1][N / 2 + 1][2];
bool used[N + 1][N / 2 + 1][2];
pair<int, int> d(int n, int cnt, int use_last) {
  int max_cnt = n / 2 + n % 2;
  if (cnt > max_cnt || cnt == max_cnt && (n & 1) && !use_last || cnt < use_last)
    return make_pair(inf, 0);
  if (n == 1 || cnt == 0) return make_pair(0, a[n - 1]);
  if (!used[n][cnt][use_last]) {
    used[n][cnt][use_last] = true;
    pair<int, int> res1 = d(n - 1, cnt, 0);
    pair<int, int> res2 = d(n - 1, cnt, 1);
    pair<int, int> res3 = d(n - 1, cnt - 1, 0);
    res1.second = a[n - 1];
    res2.first += max(0, a[n - 1] - a[n - 2] + 1);
    res2.second = min(a[n - 1], a[n - 2] - 1);
    res3.first += max(0, res3.second - a[n - 1] + 1);
    res1 = min(res1, make_pair(inf, 0));
    res2 = min(res2, make_pair(inf, 0));
    res3 = min(res3, make_pair(inf, 0));
    if (use_last)
      dp[n][cnt][use_last] = res3;
    else
      dp[n][cnt][use_last] = min(res1, res2);
  }
  return dp[n][cnt][use_last];
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; ++i) scanf("%d", &a[i]);
  max_cnt = n / 2 + n % 2;
  for (int i = 1; i <= max_cnt; ++i)
    printf("%d ", min(d(n, i, 0), d(n, i, 1)).first);
  return 0;
}
