#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, K;
  cin >> N >> K;
  vector<pair<int, int> > instr(N);
  for (int i = 0; i < N; i++) {
    int in;
    cin >> in;
    instr[i] = make_pair(in, i + 1);
  }
  sort(instr.begin(), instr.end());
  int i = 0;
  while (i < instr.size() && K >= instr[i].first) {
    K -= instr[i].first;
    i++;
  }
  cout << i << endl;
  if (i > 0) {
    for (int e = 0; e < i - 1; e++) {
      cout << instr[e].second << " ";
    }
    cout << instr[i - 1].second << endl;
  }
  return 0;
}
