#include <bits/stdc++.h>
using namespace std;
struct inst {
  int id, minutes;
};
bool mysort(inst a, inst b) { return a.minutes < b.minutes; }
int main() {
  vector<inst> a;
  int n, time, curr;
  vector<int> answ;
  cin >> n >> time;
  for (int i = 0; i < n; i++) {
    cin >> curr;
    inst struct_temp;
    struct_temp.id = i + 1;
    struct_temp.minutes = curr;
    a.push_back(struct_temp);
  }
  sort(a.begin(), a.end(), mysort);
  for (int i = 0; i < a.size(); i++) {
    if (time >= a[i].minutes) {
      time -= a[i].minutes;
      answ.push_back(a[i].id);
    }
  }
  cout << answ.size() << endl;
  for (int i = 0; i < answ.size(); i++) {
    cout << answ[i] << " ";
  }
  return 0;
}
