#include <bits/stdc++.h>
using namespace std;
int a, b, n;
map<long long, pair<int, long long>> dps[10];
inline int get(long long h, int idx) {
  int result = (h >> (6 * idx)) & 63ll;
  if (result >= 32) {
    return -1;
  } else {
    return result;
  }
}
inline long long put(long long h, int idx, long long val) {
  h &= ~(63ll << (6 * idx));
  if (val < 0ll) {
    h |= 63ll << (6 * idx);
  } else {
    h |= val << (6 * idx);
  }
  return h;
}
pair<int, long long> brute(long long h, int idx) {
  long long save = h;
  if (idx == n - 2) {
    int mx = max(max(0, get(h, n - 3) / b + 1),
                 max(get(h, n - 2) / a + 1, get(h, n - 1) / b + 1));
    return make_pair(mx, put(0ll, idx, mx));
  }
  int result = 0;
  int hp = get(h, idx - 1);
  if (hp >= 0) {
    result += hp / b + 1;
    h = put(h, idx - 1, -1);
    h = put(h, idx, get(save, idx) - result * a);
    h = put(h, idx + 1, get(save, idx + 1) - result * b);
  }
  pair<int, long long> tmpr;
  int ltmp = get(h, idx - 1);
  int ctmp = get(h, idx);
  int rtmp = get(h, idx + 1);
  if (ctmp < 0) {
    tmpr = brute(h, idx + 1);
    return make_pair(result + tmpr.first, put(tmpr.second, idx, result));
  }
  auto it = dps[idx].find(save);
  if (it != dps[idx].end()) {
    return it->second;
  }
  int turns = ctmp / a + 1;
  tmpr = brute(put(put(h, idx, -1), idx + 1, rtmp - turns * b), idx + 1);
  int minv = turns + tmpr.first;
  long long minp = put(tmpr.second, idx, result + turns);
  for (int i = 0; i < turns; i++) {
    tmpr =
        brute(put(put(h, idx, ctmp - i * a), idx + 1, rtmp - i * b), idx + 1);
    int lv = i + tmpr.first;
    if (lv < minv) {
      minv = lv;
      minp = put(tmpr.second, idx, result + i);
    }
  }
  pair<int, long long> ans = make_pair(minv + result, minp);
  dps[idx].insert(make_pair(save, ans));
  return ans;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> a >> b;
  long long h = 0;
  long long pow = 1;
  for (int i = 0; i < n; i++) {
    int p;
    cin >> p;
    h += p * pow;
    pow *= 64;
  }
  pair<int, long long> result = brute(h, 1);
  cout << result.first << '\n';
  for (int i = 0; i < n; i++) {
    int v = get(result.second, i);
    for (int j = 0; j < v; j++) {
      cout << i + 1 << ' ';
    }
  }
  cout << '\n';
  return 0;
}
