#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<pair<int, int>> days;
  int instruments, freeDays;
  cin >> instruments >> freeDays;
  for (int i = 0; i < instruments; i++) {
    pair<int, int> sample;
    cin >> sample.first;
    sample.second = i + 1;
    days.push_back(sample);
  }
  sort(days.begin(), days.end());
  int index = 0;
  while (days[index].first <= freeDays) {
    freeDays -= days[index++].first;
    if (index >= days.size()) break;
  }
  cout << index << endl;
  for (int i = 0; i < index; i++) cout << days[i].second << " ";
  return 0;
}
