#include <bits/stdc++.h>
using namespace std;
int n, a[5003];
long long dp[5003][2503], pd[5003][2503];
int main() {
  scanf("%d", &n);
  for (int i = 0; i < n; i++) {
    scanf("%d", a + i);
  }
  memset(dp, 0x3f, sizeof(dp));
  memset(pd, 0x3f, sizeof(pd));
  for (int m = 0; m <= n; m++) {
    dp[m][0] = 0LL;
    pd[m][0] = 0LL;
  }
  for (int k = 1; k <= (n + 1) / 2; k++) {
    pd[2 * k - 1][k] = 0LL;
    for (int i = 0; i < 2 * k - 1; i++) {
      if (i & 1) {
        pd[2 * k - 1][k] += 1LL * max(0, a[i] - min(a[i - 1], a[i + 1]) + 1);
      }
    }
    for (int m = 2 * k; m <= n; m++) {
      if (m == 2) {
        if (a[0] == a[1])
          pd[m][k] = dp[m][k] = 1LL;
        else {
          if (a[0] < a[1])
            pd[m][k] = 0LL, dp[m][k] = 1LL * a[1] - a[0] + 1;
          else
            pd[m][k] = 1LL * a[0] - a[1] + 1, dp[m][k] = 0;
        }
        continue;
      }
      dp[m][k] = pd[m - 1][k] + 1LL * max(0, a[m - 1] - a[m - 2] + 1);
      dp[m][k] = min(dp[m][k], dp[m - 1][k]);
      pd[m][k] = pd[m - 2][k - 1] +
                 1LL * max(0, a[m - 2] - min(a[m - 3], a[m - 1]) + 1);
      pd[m][k] = min(pd[m][k],
                     dp[m - 2][k - 1] + 1LL * max(0, a[m - 2] - a[m - 1] + 1));
    }
    if (k > 1) putchar(' ');
    printf("%lld", min(pd[n][k], dp[n][k]));
  }
  puts("");
  ;
  return 0;
}
