#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > instruments;
int main(int argc, char **argv) {
  int n, k;
  int result = 0;
  vector<int> rr;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    int c;
    cin >> c;
    instruments.push_back(make_pair(c, i));
  }
  sort(instruments.begin(), instruments.end());
  int cur = 0;
  for (int i = 0; i < n; i++) {
    if (cur + instruments[i].first > k) {
      break;
    }
    rr.push_back(instruments[i].second + 1);
    cur += instruments[i].first;
    result++;
  }
  cout << result << endl;
  if (result != 0) {
    for (int i = 0; i < result; i++) {
      cout << rr[i] << " ";
    }
    cout << endl;
  }
  return 0;
}
