#include <bits/stdc++.h>
#pragma warning(disable : 4996)
using namespace std;
long long cntPair(long long v) { return v * (v - 1) / 2LL; }
int main() {
  int n, d;
  cin >> n >> d;
  vector<pair<int, int> > v(n);
  for (int i = 0; i < n; i++) {
    cin >> v[i].first;
    v[i].second = i + 1;
  }
  sort(v.begin(), v.end());
  vector<int> ans;
  for (int i = 0; i < v.size(); i++) {
    if (d >= v[i].first) {
      d -= v[i].first;
      ans.push_back(v[i].second);
    } else
      break;
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
}
