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