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