#include <bits/stdc++.h>
using namespace std;
struct Node {
  pair<int, pair<char, char>>* ptr;
  bool valid;
  int num;
  char a, b, f, s;
  Node() {
    num = 1000;
    valid = false;
    a = b = f = s = 0;
    ptr = 0;
  }
};
int a, b, N;
int h[10];
Node dt[17][17][10];
pair<int, pair<char, char>>* Current;
pair<int, pair<char, char>>* Next;
pair<int, pair<char, char>> _current[255];
pair<int, pair<char, char>> _next[255];
int icur = 0, inext = 0;
int main() {
  cin >> N >> a >> b;
  for (int i = 0; i < N; i++) {
    cin >> h[i];
    h[i]++;
  }
  int t1, t2, t3, t4, A, B, v, w;
  Current = &_current[0], Next = &_next[0];
  B = (h[N - 1] / b) + bool(h[N - 1] % b);
  h[N - 1] = 0;
  t1 = h[N - 2] - (a * B);
  if (t1 < 0) t1 = 0;
  h[N - 2] = t1;
  t2 = h[N - 3] - (b * B);
  if (t2 < 0) t2 = 0;
  h[N - 3] = t2;
  int _a = B;
  B = (h[0] / b) + bool(h[0] % b);
  t1 = h[1] - (a * B);
  if (t1 < 0) t1 = 0;
  h[1] = t1;
  t2 = h[2] - (b * B);
  if (t2 < 0) t2 = 0;
  h[2] = t2;
  dt[t1][t2][1].num = B, dt[t1][t2][1].valid = true, dt[t1][t2][1].a = B;
  Current[icur].first = B;
  Current[icur++].second = pair<char, char>(t1, t2);
  for (int k = 1; k < N - 2; k++) {
    for (int j = 0; j < icur; j++) {
      v = Current[j].second.first;
      w = Current[j].second.second;
      A = B = 0;
      while (1) {
        t1 = v, t2 = w, t3 = h[k + 2], t4 = dt[v][w][k].num;
        B = (v - A);
        if (B > 0)
          B = (B / b) + bool(B % b);
        else
          B = 0;
        for (int i1 = 0; i1 < B; i1++) {
          t1 -= b, t2 -= a, t3 -= b;
          t4++;
          (t1 < 0) ? (t1 = 0) : true, (t2 < 0) ? (t2 = 0) : true,
              (t3 < 0) ? (t3 = 0) : true;
        }
        for (int j1 = 0; j1 < A; j1 += a) {
          t1 -= a, t2 -= b, t4++;
          (t1 < 0) ? (t1 = 0) : true, (t2 < 0) ? (t2 = 0) : true;
        }
        if (dt[t2][t3][k + 1].num > t4) {
          dt[t2][t3][k + 1].num = t4;
          dt[t2][t3][k + 1].valid = true;
          dt[t2][t3][k + 1].a = B;
          dt[t2][t3][k + 1].b = A / a;
          dt[t2][t3][k + 1].f = v, dt[t2][t3][k + 1].s = w;
          pair<int, pair<char, char>>* p = dt[t2][t3][k + 1].ptr;
          if (!p) {
            p = dt[t2][t3][k + 1].ptr = &Next[inext++];
            (*p).second = pair<char, char>(t2, t3);
          }
          (*p).first = t4;
        }
        if (B <= 0) break;
        A += a;
      }
    }
    swap<pair<int, pair<char, char>>*>(Current, Next);
    icur = inext;
    inext = 0;
    std::sort<pair<int, pair<char, char>>*>(Current, Current + icur);
  }
  t1 = 10000;
  pair<int, int> temp;
  for (int i = 0; i < icur; i++) {
    v = Current[i].second.first, w = Current[i].second.second;
    A = (v / a) + bool(v % a);
    t2 = A + Current[i].first;
    if (t1 > t2) {
      t1 = t2;
      temp.first = v, temp.second = w;
      dt[v][w][N - 2].a += A;
      dt[v][w][N - 2].num = t2;
    }
  }
  v = temp.first, w = temp.second;
  dt[v][w][N - 2].a += _a;
  cout << dt[v][w][N - 2].num + _a << '\n';
  Node _temp;
  for (int q = N - 2; q > 0; q--) {
    _temp = dt[v][w][q];
    for (int i = 0; i < _temp.a; i++) cout << q + 1 << ' ';
    dt[_temp.f][_temp.s][q - 1].a += _temp.b;
    v = _temp.f, w = _temp.s;
  }
  cout << '\n';
  return 0;
}
