#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, idx = 0;
  cin >> n >> k;
  pair<int, int> inst[n];
  vector<int> v;
  for (int i = 1; i <= n; i++) {
    int t;
    cin >> t;
    inst[i - 1] = make_pair(t, i);
  }
  sort(inst, inst + n);
  while (k >= inst[idx].first && idx < n) {
    v.push_back(inst[idx].second);
    k -= inst[idx].first;
    idx++;
  }
  cout << v.size() << endl;
  for (int i = 0; i < v.size(); i++) cout << v[i] << " ";
  return 0;
}
