#include <bits/stdc++.h>
using namespace std;
int n, a[5100], dp[5100][5100], mn[5100][5100];
const int inf = 2e9;
int main() {
  cin >> n;
  for (int i = 1; i <= n; i++) scanf("%d", &a[i]);
  for (int i = 0; i <= n; i++)
    for (int j = 0; j <= n; j++) dp[i][j] = inf;
  for (int i = 1; i <= n; i++) dp[1][i] = 0;
  for (int i = 1; i <= n; i++) {
    if (a[i - 1] >= a[i]) dp[1][i] += a[i - 1] - a[i] + 1;
    if (a[i + 1] >= a[i]) dp[1][i] += a[i + 1] - a[i] + 1;
  }
  mn[1][0] = dp[1][0];
  for (int i = 1; i <= n; i++) mn[1][i] = min(mn[1][i - 1], dp[1][i]);
  int k = (n + 1) / 2, nval;
  for (int i = 2; i <= k; i++) {
    for (int j = i + i - 1; j <= n; j++) {
      dp[i][j] = mn[i - 1][j - 3];
      if (a[j - 1] >= a[j]) dp[i][j] += a[j - 1] - a[j] + 1;
      if (a[j + 1] >= a[j]) dp[i][j] += a[j + 1] - a[j] + 1;
      if (a[j] >= a[j - 2])
        dp[i][j] =
            min(dp[i][j], dp[i - 1][j - 2] + max(a[j + 1] - a[j] + 1, 0));
      else {
        nval = dp[i - 1][j - 2];
        if (a[j - 2] > a[j - 1]) {
          nval += max(a[j + 1] - a[j] + 1, 0);
          nval += max(a[j - 1] - a[j] + 1, 0);
        } else {
          nval -= a[j - 1] - a[j - 2] + 1;
          nval += max(a[j + 1] - a[j] + 1, 0);
          nval += max(a[j - 1] - a[j] + 1, 0);
        }
        dp[i][j] = min(dp[i][j], nval);
      }
    }
    mn[i][0] = dp[i][0];
    for (int j = 1; j <= n; j++) mn[i][j] = min(mn[i][j - 1], dp[i][j]);
  }
  for (int i = 1; i <= k; i++) printf("%d ", mn[i][n]);
  return 0;
}
