#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  multimap<int, int> m;
  multimap<int, int>::iterator it;
  int a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    m.insert(make_pair(a[i], i + 1));
  }
  vector<int> ans;
  int count = 0;
  for (it = m.begin(); it != m.end(); it++) {
    if (it->first <= k) {
      k = k - it->first;
      ans.push_back(it->second);
      count++;
    }
  }
  printf("%d\n", count);
  for (int i = 0; i < count; i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
  return 0;
}
