#include <bits/stdc++.h>
using namespace std;
const int INF = 1E6;
int N;
vector<int> arc;
int a, b;
int dp[17][17][12];
int minATK(int pre, int cur, int i) {
  int min_atk = INF, low = (pre + b - 1) / b,
      up = max((pre + b - 1) / b, (cur + a - 1) / a);
  if (i == N - 2) {
    min_atk = max(up, (arc[N - 1] + b - 1) / b);
    dp[pre][cur][i] = min_atk;
    return min_atk;
  }
  for (int iatk = up; iatk >= low; iatk--) {
    int tmp_pre = max(cur - iatk * a, 0),
        tmp_cur = max(arc[i + 1] - iatk * b, 0);
    int tmp = minATK(tmp_pre, tmp_cur, i + 1) + iatk;
    if (tmp < min_atk) {
      min_atk = tmp;
      dp[pre][cur][i] = iatk;
    }
  }
  return min_atk;
}
int main() {
  cin >> N >> a >> b;
  for (int i = 0; i < N; i++) {
    int hp;
    scanf("%d", &hp);
    arc.push_back(hp + 1);
  }
  memset(dp, 0, sizeof(dp));
  int min_atk = minATK(arc[0], arc[1], 1);
  printf("%d\n", min_atk);
  int pre = arc[0], cur = arc[1];
  for (int i = 1; i <= N - 1; i++) {
    int k = dp[pre][cur][i];
    for (int j = 0; j < k; j++) {
      printf("%d ", i + 1);
    }
    pre = max(cur - k * a, 0);
    cur = max(arc[i + 1] - k * b, 0);
  }
}
