#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, d, sum = 0;
  cin >> n >> d;
  vector<pair<int, int> > ins(n);
  for (int i = 0; i < n; i++) {
    cin >> ins[i].first;
    ins[i].second = i + 1;
  }
  sort(ins.begin(), ins.end());
  int i = 0;
  while (i < n and ((sum + ins[i].first) <= d)) {
    sum += ins[i].first;
    i++;
  }
  cout << i << endl;
  for (int j = 0; j < i; j++) {
    if (j > 0) cout << " ";
    cout << ins[j].second;
  }
  return 0;
}
