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