#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long n, k;
  cin >> n >> k;
  vector<pair<long long, long long> > a;
  for (long long i = 0; i < n; i++) {
    long long x;
    cin >> x;
    a.push_back({x, i + 1});
  }
  sort(a.begin(), a.end());
  vector<long long> ans;
  for (long long i = 0; i < n; i++) {
    if (k >= a[i].first) {
      ans.push_back(a[i].second);
      k -= a[i].first;
    } else
      break;
  }
  cout << ans.size() << endl;
  for (long long i = 0; i < ans.size(); i++) cout << ans[i] << " ";
}
