#include <bits/stdc++.h>
using namespace std;
int main() {
  multiset<pair<int, int> > s;
  multiset<pair<int, int> >::iterator itr;
  int n, k, m = 0, num, res = 0, i;
  cin >> n >> k;
  for (i = 0; i < n; i++) {
    cin >> num;
    s.insert(make_pair(num, i + 1));
  }
  itr = s.begin();
  while (1) {
    if (res + (*itr).first <= k && itr != s.end()) {
      res += (*itr).first;
      m++;
      itr++;
    } else
      break;
  }
  cout << m << endl;
  itr = s.begin();
  for (i = 0; i < m; i++) {
    cout << (*itr).second << " ";
    itr++;
  }
}
