#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
const int MAX = 15 + 5;
const long long MAX2 = 11;
const long long MOD = 1000000007;
const long long MOD2 = 1000005329;
const long long INF = 2e18;
const int dr[] = {1, 0, -1, 0, 1, 1, -1, -1, 0};
const int dc[] = {0, 1, 0, -1, 1, -1, 1, -1, 0};
const double pi = acos(-1);
const double EPS = 1e-9;
const int block = 2000;
int n, a, b, x[MAX], dp[MAX][MAX][MAX];
vector<int> ans;
int f(int nw, int pvv, int pv) {
  if (pvv < 0) pvv = 0;
  if (pv < 0) pv = 0;
  if (nw == n + 1) return (pvv ? 1e9 : 0);
  if (dp[nw][pvv][pv] != -1) return dp[nw][pvv][pv];
  int &ret = dp[nw][pvv][pv];
  ret = 1e9;
  for (int i = 0; i <= 15; ++i) {
    if (pvv <= 0) ret = min(ret, f(nw + 1, pv, x[nw] - b * i) + i);
    pv -= a, pvv -= b;
  }
  return ret;
}
void bt(int nw, int pvv, int pv) {
  if (pvv < 0) pvv = 0;
  if (pv < 0) pv = 0;
  if (nw == n + 1) return;
  int ret = dp[nw][pvv][pv];
  for (int i = 0; i <= 15; ++i) {
    if (pvv <= 0) {
      if (ret == f(nw + 1, pv, x[nw] - b * i) + i) {
        bt(nw + 1, pv, x[nw] - b * i);
        break;
      }
    }
    ans.push_back(nw - 1);
    pv -= a, pvv -= b;
  }
  return;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> a >> b;
  for (int i = 1; i <= n; ++i) cin >> x[i], ++x[i];
  while (x[1] > 0) ans.push_back(2), x[1] -= b, x[2] -= a, x[3] -= b;
  while (x[n] > 0)
    ans.push_back(n - 1), x[n - 2] -= b, x[n - 1] -= a, x[n] -= b;
  memset(dp, -1, sizeof dp);
  f(3, x[1], x[2]);
  bt(3, x[1], x[2]);
  cout << ans.size() << '\n';
  for (auto i : ans) cout << i << ' ';
  return 0;
}
