#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<pair<int, int> > v(n);
  vector<int> v2;
  for (int x = 0; x < n; x++) {
    int t;
    cin >> t;
    v[x] = {t, x};
  };
  sort(v.begin(), v.end());
  while (k > 0 && !v.empty()) {
    if (k >= v[0].first) {
      k -= v[0].first;
      v2.push_back(v[0].second + 1);
      v.erase(v.begin());
    } else
      break;
  }
  cout << v2.size() << endl;
  for (int x = 0; x < v2.size(); x++) cout << v2[x] << " ";
}
