#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, temp;
  pair<int, int> val[100];
  vector<int> ans;
  scanf("%d%d", &n, &k);
  ;
  for (int i = 0; i < n; i++) {
    scanf("%d", &temp);
    ;
    val[i] = make_pair(temp, i + 1);
  }
  sort(val, val + n);
  int res = 0, tot = 0;
  for (int i = 0; i < n; i++) {
    if (tot + val[i].first <= k) {
      res++;
      tot += val[i].first;
      ans.push_back(val[i].second);
    }
  }
  cout << res << endl;
  for (int i = 0; i < ans.size(); i++) {
    cout << ans[i] << " ";
  }
  cout << endl;
  return 0;
}
