#include <bits/stdc++.h>
using namespace std;
int n, a, b, t, arr[11];
int dp[11][17][17];
int dpp[11][17][17];
int solve(int i, int p, int c) {
  if (i == n - 1) return (p == 0 && c == 0) ? 0 : 1e6;
  int tmp, pp, cc;
  int &ret = dp[i][p][c], &j = dpp[i][p][c];
  if (ret != -1) return ret;
  ret = 1e6;
  j = 1e6;
  if (p == 0) ret = solve(i + 1, c, arr[i + 1]), j = 0;
  for (int k = max(p / b + ((p % b) != 0), 1);; ++k) {
    pp = max(0, c - k * a);
    cc = max(0, arr[i + 1] - k * b);
    tmp = solve(i + 1, pp, cc);
    if (tmp + k < ret) {
      ret = tmp + k;
      j = k;
    }
    if (arr[i + 1] <= k * b && c <= k * a) break;
  }
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin >> n >> a >> b;
  for (int i = 0; i < n; ++arr[i], ++i) cin >> arr[i];
  memset(dp, -1, sizeof dp);
  t = solve(1, arr[0], arr[1]);
  cout << t << endl;
  for (int i = 1, p = arr[0], c = arr[1]; i < n - 1; ++i) {
    int j = dpp[i][p][c];
    p = max(0, c - j * a);
    c = max(0, arr[i + 1] - j * b);
    while (j--) {
      cout << i + 1 << " ";
    }
  }
}
