#include <bits/stdc++.h>
struct instrument {
  int ser;
  int days;
} a[104], tmp;
int main() {
  int n, k, i, j, sum = 0;
  scanf("%d %d", &n, &k);
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i].days);
    a[i].ser = i;
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < i; j++) {
      if (a[j].days > a[i].days) {
        tmp = a[i];
        a[i] = a[j];
        a[j] = tmp;
      }
    }
  }
  for (i = 0; i < n; i++) {
    sum += a[i].days;
    if (sum > k) break;
  }
  if (k < a[0].days)
    printf("0");
  else if (i == n && sum <= k) {
    printf("%d\n", n);
    for (j = 0; j < n; j++) printf("%d ", j + 1);
  } else {
    printf("%d\n", i);
    for (j = 0; j < i; j++) printf("%d ", a[j].ser + 1);
  }
  return 0;
}
