#include <bits/stdc++.h>
using namespace std;
int main() {
  int inst, day;
  cin >> inst >> day;
  pair<int, int> days[inst];
  int cnt = 0;
  for (cnt; cnt < inst; cnt++) cin >> days[cnt].first, days[cnt].second = cnt;
  sort(days, days + inst);
  int sum = 0;
  for (cnt = 0; cnt < inst; cnt++) {
    if (sum + days[cnt].first <= day)
      sum += days[cnt].first;
    else
      break;
  }
  cout << cnt << endl;
  if (cnt != 0) {
    for (int i = 0; i < cnt - 1; i++) {
      cout << days[i].second + 1 << " ";
    }
    cout << days[cnt - 1].second + 1;
  }
  return 0;
}
