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