#include <bits/stdc++.h>
using namespace std;
const int N = 20;
const int INF = 1e8 + 10;
int n, a, b;
int h[N];
int dp[N][N][N];
map<pair<int, pair<int, int> >, pair<int, pair<int, int> > > pre;
map<pair<int, pair<int, int> >, int> step;
vector<int> ans;
int main() {
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 1; i <= n; ++i) {
    scanf("%d", h + i);
  }
  fill((int *)dp, (int *)(dp + N), INF);
  dp[1][h[1] + 1][h[2] + 1] = 0;
  for (int i = 2; i <= n - 1; ++i) {
    for (int j = 0; j < N; ++j) {
      for (int k = 0; k < N; ++k) {
        if (dp[i - 1][j][k] >= INF) continue;
        for (int c = 0; c < N; ++c) {
          int nj = max(0, j - c * b);
          if (nj != 0) continue;
          int nk = max(0, k - c * a);
          int nn = max(0, h[i + 1] + 1 - c * b);
          if (dp[i][nk][nn] > dp[i - 1][j][k] + c) {
            pre[make_pair(i, make_pair(nk, nn))] =
                make_pair(i - 1, make_pair(j, k));
            step[make_pair(i, make_pair(nk, nn))] = c;
          }
          dp[i][nk][nn] = min(dp[i][nk][nn], dp[i - 1][j][k] + c);
        }
      }
    }
  }
  printf("%d\n", dp[n - 1][0][0]);
  pair<int, pair<int, int> > tmp = make_pair(n - 1, make_pair(0, 0));
  while (tmp.first > 1) {
    int c = step[tmp];
    while (c--) {
      ans.push_back(tmp.first);
    }
    tmp = pre[tmp];
  }
  for (int i = 0; i < ans.size(); ++i) {
    printf("%d%c", ans[i], " \n"[i == (int)ans.size() - 1]);
  }
  return 0;
}
