#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int k;
  cin >> k;
  long arr[n];
  vector<pair<long, int> > vect;
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    vect.push_back(make_pair(arr[i], i + 1));
  }
  sort(vect.begin(), vect.end());
  long count = 0;
  int i = 0;
  while (count < k && i < n) {
    count = count + vect[i].first;
    i++;
  }
  if (count > k) {
    i--;
    count = count - vect[i].first;
  }
  cout << i << "\n";
  if (i != 0) {
    for (int j = 0; j < i; j++) {
      cout << vect[j].second << " ";
    }
  }
  return 0;
}
