#include <bits/stdc++.h>
using namespace std;
struct inst {
  int day;
  int in;
};
bool fi(inst a, inst b) { return a.in < b.in; }
bool fd(inst a, inst b) { return a.day < b.day; }
int main() {
  long long n, k;
  cin >> n >> k;
  std::vector<inst> v(n);
  for (long long i = 0; i < n; i++) {
    cin >> v[i].day;
    v[i].in = i + 1;
  }
  sort(v.begin(), v.end(), fd);
  std::vector<inst> ins;
  long long ans = 0;
  for (long long i = 0; i < n; i++) {
    if (v[i].day <= k) {
      ans++;
      k -= v[i].day;
      ins.push_back(v[i]);
    }
  }
  sort(ins.begin(), ins.end(), fi);
  cout << ans << endl;
  for (long long i = 0; i < ins.size(); i++) {
    cout << ins[i].in << ' ';
  }
  return 0;
}
