#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<pair<int, int> > a;
  int tmp, sum = 0;
  for (int i = 0; i < n; i++) cin >> tmp, a.push_back(make_pair(tmp, i + 1));
  sort(a.begin(), a.end());
  vector<int> ans;
  for (int i = 0; i < n; i++) {
    sum += a[i].first;
    if (sum <= k)
      ans.push_back(a[i].second);
    else
      i = n;
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << ' ';
  if (ans.size()) cout << endl;
  return (0);
}
