#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<int, int> p1, pair<int, int> p2) {
  if (p1.second < p2.second) return true;
  return false;
}
int main() {
  vector<pair<int, int> > v;
  vector<int> ans;
  int n, k, x;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> x;
    v.push_back(make_pair(i + 1, x));
  }
  sort(v.begin(), v.end(), cmp);
  for (int i = 0; i < v.size(); i++) {
    if (k - v[i].second < 0) break;
    ans.push_back(v[i].first);
    k -= v[i].second;
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i] << " ";
  }
  if (ans.size() > 0) cout << endl;
  return 0;
}
