#include <bits/stdc++.h>
using namespace std;
int main() {
  int no_of_instruments, no_of_days, day_i;
  scanf("%d %d", &no_of_instruments, &no_of_days);
  vector<pair<int, int> > no_of_days_to_learn;
  for (int i = 0; i < no_of_instruments; i++) {
    scanf("%d", &day_i);
    no_of_days_to_learn.push_back(make_pair(day_i, i + 1));
  }
  sort((no_of_days_to_learn).begin(), (no_of_days_to_learn).end());
  vector<int> learnt_instrument;
  for (int i = 0; i < no_of_instruments && no_of_days > 0; i++) {
    no_of_days -= no_of_days_to_learn[i].first;
    if (no_of_days >= 0)
      learnt_instrument.push_back(no_of_days_to_learn[i].second);
  }
  printf("%u\n", learnt_instrument.size());
  for (unsigned int i = 0; i < learnt_instrument.size(); i++)
    printf("%d ", learnt_instrument[i]);
  return 0;
}
