#include <bits/stdc++.h>
using namespace std;
const int N = 5005;
int n, a[N], dp[N][2505][2];
int get(int real, int to) {
  if (real <= to) return 0;
  return real - to;
}
int gethalf(int x) {
  if (x % 2 == 0)
    return x / 2;
  else
    return x / 2 + 1;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 0; i < n; i++) cin >> a[i];
  a[n] = 0;
  memset(dp, 63, sizeof(dp));
  dp[0][0][0] = 0;
  for (int i = 0; i < n; i++)
    for (int j = 0; j < gethalf(i + 1) + 1; j++)
      for (int k = 0; k < 2; k++)
        if (dp[i][j][k] != 1061109567) {
          dp[i + 1][j][0] =
              dp[i + 1][j][0] < dp[i][j][k] ? dp[i + 1][j][0] : dp[i][j][k];
          int curleft = i ? a[i - 1] : 0;
          if (i > 1 && k == 1) curleft = min(curleft, a[i - 2] - 1);
          dp[min(i + 2, n)][j + 1][1] =
              dp[min(i + 2, n)][j + 1][1] < dp[i][j][k] +
                                                get(curleft, a[i] - 1) +
                                                get(a[i + 1], a[i] - 1)
                  ? dp[min(i + 2, n)][j + 1][1]
                  : dp[i][j][k] + get(curleft, a[i] - 1) +
                        get(a[i + 1], a[i] - 1);
        }
  for (int i = 1; i < gethalf(n) + 1; i++) {
    int ans = min(dp[n][i][0], dp[n][i][1]);
    cout << ans << " ";
  }
  return 0;
}
