#include <bits/stdc++.h>
using namespace std;
map<vector<int>, int> f;
map<vector<int>, int> g;
int n, a, b;
vector<int> beg;
int tot = 0;
int dfs(vector<int> v) {
  if (f.find(v) != f.end()) return f[v];
  if (*max_element((v).begin(), (v).end()) < 0) return f[v] = 0;
  f[v] = 1000000000;
  for (int i = 1; i < (int)v.size() - 1; ++i)
    if (v[i] >= 0 || v[i - 1] >= 0 || v[i + 1] >= 0) {
      vector<int> nv = v;
      nv[i] -= a;
      if (nv[i] < 0) nv[i] = -1;
      nv[i - 1] -= b;
      if (nv[i - 1] < 0) nv[i - 1] = -1;
      nv[i + 1] -= b;
      if (nv[i + 1] < 0) nv[i + 1] = -1;
      int val = dfs(nv);
      if (f[v] > val + 1) {
        f[v] = val + 1;
        g[v] = i;
      }
    }
  return f[v];
}
int main() {
  cin >> n >> a >> b;
  beg.resize(n);
  for (int(i) = 0; (i) < (n); ++(i)) cin >> beg[i];
  vector<int> plus;
  plus.clear();
  int ans = 0;
  while (beg[0] >= 0) {
    ++ans;
    plus.push_back(2);
    beg[0] -= b;
    if (beg[0] < 0) beg[0] = -1;
    beg[1] -= a;
    if (beg[1] < 0) beg[1] = -1;
    beg[2] -= b;
    if (beg[2] < 0) beg[2] = -1;
  }
  while (beg.back() >= 0) {
    ++ans;
    plus.push_back((int)beg.size() - 1);
    beg.back() -= b;
    if (beg.back() < 0) beg.back() = -1;
    beg[(int)beg.size() - 2] -= a;
    if (beg[(int)beg.size() - 2] < 0) beg[(int)beg.size() - 2] = -1;
    beg[(int)beg.size() - 3] -= b;
    if (beg[(int)beg.size() - 3] < 0) beg[(int)beg.size() - 3] = -1;
  }
  cout << ans + dfs(beg) << endl;
  for (int(i) = 0; (i) < ((int)plus.size()); ++(i)) cout << plus[i] << " ";
  while (*max_element((beg).begin(), (beg).end()) >= 0) {
    int pos = g[beg];
    cout << pos + 1 << " ";
    beg[pos] -= a;
    if (beg[pos] < 0) beg[pos] = -1;
    beg[pos - 1] -= b;
    if (beg[pos - 1] < 0) beg[pos - 1] = -1;
    beg[pos + 1] -= b;
    if (beg[pos + 1] < 0) beg[pos + 1] = -1;
  }
  cout << endl;
  return 0;
}
