#include <bits/stdc++.h>
struct f {
  int pos;
  int num;
} a[108];
int cmp(const void *a, const void *b) {
  return (*(struct f *)a).num - (*(struct f *)b).num;
}
int main() {
  int n, k;
  while (scanf("%d%d", &n, &k) == 2) {
    int i;
    for (i = 0; i < n; i++) {
      scanf("%d", &a[i].num);
      a[i].pos = i + 1;
    }
    qsort(a, n, sizeof(a[0]), cmp);
    int sum = 0;
    int count = 0;
    for (i = 0; i < n; i++) {
      if (i == 0 && a[i].num > k) break;
      sum += a[i].num;
      if (sum > k) break;
      count++;
    }
    printf("%d\n", count);
    for (i = 0; i < count; i++) {
      if (i != 0)
        printf(" %d", a[i].pos);
      else
        printf("%d", a[i].pos);
    }
    if (count) printf("\n");
  }
  return 0;
}
