#include <bits/stdc++.h>
using namespace std;
int dp[5002][2502][2];
int main() {
  for (long long i = 0; i < (5002); i++)
    for (long long j = 0; j < (2502); j++)
      for (long long k = 0; k < (2); k++) dp[i][j][k] = (int)6e8;
  for (long long i = 0; i < (5002); i++) dp[i][0][0] = 0;
  long long(n);
  scanf("%lld", &(n));
  ;
  vector<int> A(n);
  for (long long i = 0; i < (n); i++) scanf("%d", &A[i]);
  A.insert(A.begin(), 0);
  long long k = n / 2 + (n % 2);
  for (long long i = 1; i < (n + 1); i++) {
    for (long long j = 1; j < (k + 1); j++) {
      dp[i][j][0] =
          min(dp[i - 1][j][0], dp[i - 1][j][1] + max(0, A[i] - A[i - 1] + 1));
      dp[i][j][1] = min(
          dp[i - 1][j - 1][0] + max(0, A[i - 1] - A[i] + 1),
          (i - 2 >= 0 ? dp[i - 2][j - 1][1] : (int)6e8) +
              max(0, A[i - 1] + 1 - (min(A[i], (i - 2 >= 0 ? A[i - 2] : 0)))));
    }
  }
  for (long long j = 1; j < (k + 1); j++)
    printf("%d ", min(dp[n][j][0], dp[n][j][1]));
  printf("\n");
  return 0;
}
