#include <bits/stdc++.h>
namespace FastIO {
const int SIZ = 1 << 21 | 1;
char *iS, *iT, ibuff[SIZ], obuff[SIZ], *oS = obuff, *oT = oS + SIZ - 1, fu[110],
                                       cc;
int fr;
inline void out() {
  fwrite(obuff, 1, oS - obuff, stdout);
  oS = obuff;
}
template <class Type>
inline void read(Type& x) {
  x = 0;
  Type y = 1;
  for (cc = (iS == iT ? (iT = (iS = ibuff) + fread(ibuff, 1, SIZ, stdin),
                        (iS == iT ? EOF : *iS++))
                      : *iS++);
       (cc > '9' || cc < '0') && cc != '-';
       cc = (iS == iT ? (iT = (iS = ibuff) + fread(ibuff, 1, SIZ, stdin),
                        (iS == iT ? EOF : *iS++))
                      : *iS++))
    ;
  cc == '-' ? y = -1 : x = (cc & 15);
  for (cc = (iS == iT ? (iT = (iS = ibuff) + fread(ibuff, 1, SIZ, stdin),
                        (iS == iT ? EOF : *iS++))
                      : *iS++);
       cc >= '0' && cc <= '9';
       cc = (iS == iT ? (iT = (iS = ibuff) + fread(ibuff, 1, SIZ, stdin),
                        (iS == iT ? EOF : *iS++))
                      : *iS++))
    x = x * 10 + (cc & 15);
  x *= y;
}
template <class Type>
inline void print(Type x, char text = '\n') {
  if (x < 0) *oS++ = '-', x *= -1;
  if (x == 0) *oS++ = '0';
  while (x) fu[++fr] = x % 10 + '0', x /= 10;
  while (fr)
    ;
  *oS++ = fu[fr--];
  *oS++ = text;
  out();
}
inline void prints(char x[], char text = '\n') {
  for (register int i = 0; x[i]; ++i) *oS++ = x[i];
  *oS++ = text;
  out();
}
}  // namespace FastIO
using namespace FastIO;
template <typename T>
inline T max(T a, T b) {
  return (a > b) ? a : b;
}
template <typename T>
inline T min(T a, T b) {
  return (a > b) ? b : a;
}
const int MAXN = 10 + 10;
int dp[MAXN][MAXN][MAXN], minx[MAXN][MAXN][MAXN], pro[MAXN];
int n, a, b, hp[MAXN], posi = 1, posj, posk;
int main(int argc, char* argv[]) {
  read(n);
  read(a);
  read(b);
  for (int i = (1); i <= (n); i += (1)) read(hp[i]);
  memset(dp, (1 << 6) - 1, sizeof dp);
  for (int i = (0); i <= (16); i += (1))
    if (b * i > hp[n]) dp[n][i][0] = 0;
  for (int i = (0); i <= (16); i += (1)) pro[i] = i / b + 1;
  for (int i = (n); i >= (1); i -= (1)) {
    if (i < n)
      for (int j = (0); j <= (16); j += (1)) {
        int v = hp[i] - j * b;
        for (int k = (0); k <= (16); k += (1))
          dp[i][j][k] = k + minx[i + 1][k][v < 0 ? 0 : pro[v]], v -= a;
      }
    for (int j = (0); j <= (16); j += (1)) {
      minx[i][j][16] = dp[i][j][16];
      for (int k = (15); k >= (0); k -= (1))
        minx[i][j][k] = min(minx[i][j][k + 1], dp[i][j][k]);
    }
  }
  printf("%d\n", dp[1][0][0]);
  while (++posi < n) {
    int v = hp[posi - 1] - posj * b - posk * a;
    int l = (v < 0) ? 0 : pro[v];
    while (dp[posi][posk][l] != dp[posi - 1][posj][posk] - posk) ++l;
    posj = posk;
    posk = l;
    for (int i = (1); i <= (l); i += (1)) printf("%d ", posi);
  }
  return 0;
}
