#include <bits/stdc++.h>
using namespace std;
bool comp(pair<int, int> a, pair<int, int> b) { return a.first < b.first; }
int main() {
  std::ios_base::sync_with_stdio(false);
  int n, k;
  while (cin >> n >> k) {
    vector<pair<int, int> > V;
    for (int i = 0; i < n; i++) {
      int inp;
      cin >> inp;
      V.push_back(make_pair(inp, i));
    }
    sort(V.begin(), V.end(), comp);
    vector<int> ans;
    int total = 0;
    for (int i = 0; i < n; i++) {
      if (V[i].first + total <= k) {
        total += V[i].first;
        ans.push_back(V[i].second);
      }
    }
    cout << ans.size() << endl;
    for (int i = 0; i < ans.size(); i++) {
      if (i > 0) cout << " ";
      cout << ans[i] + 1;
    }
    if (ans.size() > 0) cout << endl;
  }
  return 0;
}
