#include <bits/stdc++.h>
using namespace std;
const int MAXN = 5 + 5000;
const int INF = 1000000000;
int memo[MAXN][MAXN / 2][2];
int arr[MAXN];
int N;
int get(int le, int hi) {
  if (le < hi) return 0;
  return 1 + le - hi;
}
int dp(int i, int l, bool f) {
  if (l == 0) return 0;
  if (i >= N) return INF;
  int& ans = memo[i][l][f];
  if (ans == -1) {
    ans = dp(1 + i, l, false);
    int costbef = 0;
    if (i - 1 >= 0) {
      costbef = get(arr[i - 1], arr[i]);
    }
    int cost = f ? 0 : costbef, cost2 = f ? 0 : costbef;
    if (1 + i < N) {
      cost += get(arr[1 + i], arr[i]);
    }
    if (2 + i < N) {
      cost2 += get(arr[1 + i], min(arr[i], arr[2 + i]));
      ans = min(ans, cost2 + dp(i + 2, l - 1, true));
    }
    ans = min(ans, cost + dp(i + 2, l - 1, false));
  }
  return ans;
}
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cin >> N;
  for (int i = (int)0; i < (int)N; ++i) cin >> arr[i];
  memset(memo, -1, sizeof memo);
  int tec = (N >> 1) + ((N % 2) != 0);
  for (int i = 1; i <= tec; ++i) {
    cout << dp(0, i, true) << ' ';
  }
  return 0;
}
