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