#include <bits/stdc++.h>
using namespace std;
double PI = 3.141592653589793;
const double EPS = 1e-6;
const int N = 1e6 + 5;
const long long mod = 1e9 + 7;
int oo = 1e9;
int dx[] = {0, 0, 1, -1, 1, -1, 1, -1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
int dp[5001][2505][2];
int n;
int t[5001];
int solve(int i, int k, int f) {
  if (i >= n) {
    return k == 0 ? 0 : oo;
  }
  int &ret = dp[i][k][f];
  if (ret != -1) return ret;
  ret = oo;
  ret = min(ret, solve(i + 1, k, 0));
  if (!f) {
    int x = 0;
    if (i) x += max(0, t[i - 1] - t[i] + 1);
    if (i + 1 < n) x += max(0, t[i + 1] - t[i] + 1);
    ret = min(ret, x + solve(i + 2, k - 1, 1));
  } else {
    int x = 0;
    int y;
    if (t[i - 2] > t[i - 1])
      y = t[i - 1];
    else
      y = t[i - 2] - 1;
    x += max(0, y - t[i] + 1);
    if (i + 1 < n) x += max(0, t[i + 1] - t[i] + 1);
    ret = min(ret, x + solve(i + 2, k - 1, 1));
  }
  return ret;
}
int main() {
  scanf("%d", &n);
  for (int i = 0; i <= n - 1; i++) scanf("%d", &t[i]);
  memset(dp, -1, sizeof dp);
  for (int i = 1; i <= (n + 1) / 2; i++) {
    printf("%d ", solve(0, i, 0));
  }
}
