#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k, i, cnt, mini, ind;
  cin >> n >> k;
  long long syn[n];
  for (i = 0; i < n; i++) {
    cin >> syn[i];
  }
  vector<long long> rod;
  cnt = 0;
  for (; k >= 0 && cnt < n;) {
    mini = 1e10;
    for (i = 0; i < n; i++) {
      if ((syn[i] <= mini) && syn[i] > 0) {
        mini = syn[i];
        ind = i;
      }
    }
    k = k - syn[ind];
    if (k < 0) {
      break;
    }
    rod.push_back(ind);
    syn[ind] = 0;
    cnt++;
  }
  cout << cnt << endl;
  for (i = 0; i < cnt; i++) {
    cout << rod[i] + 1 << " ";
  }
  return 0;
}
