#include <bits/stdc++.h>
using namespace std;
int n, k;
struct st {
  int id, val;
  bool choosen;
};
st a[105];
int ap = 0;
bool cmp1(st a, st b) { return a.val < b.val; }
int tt[105];
int main() {
  scanf("%d", &n);
  scanf("%d", &k);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i].val);
    a[i].id = i + 1;
  }
  sort(a, a + n, cmp1);
  int res = 0, cc = 0, p = 0;
  while (p < n && cc < k) {
    cc += a[p].val;
    res++;
    a[p].choosen = true;
    p++;
  }
  if (cc > k) {
    a[p - 1].choosen = false;
    res--;
  }
  printf("%d\n", res);
  if (res > 0) {
    for (int i = 0; i < n; i++) {
      if (a[i].choosen) printf("%d ", a[i].id);
    }
    putchar('\n');
  }
  return 0;
}
