#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<int> vec(n);
  vector<int> vec1(n);
  vector<int> vec2(n);
  vector<int> instrument(n);
  int sum = 0, idx = 0, idx2 = 0;
  for (int i = 0; i < n; i++) {
    cin >> vec[i];
    instrument[i] = vec[i];
  }
  if (k == 0) {
    cout << 0 << endl;
    return 0;
  }
  if (vec.size() == 1) {
    if (vec[0] > k)
      cout << 0 << endl;
    else {
      cout << 1 << endl;
      cout << 1 << endl;
    }
    return 0;
  }
  sort(vec.begin(), vec.end());
  for (int i = 0; i < n; i++) {
    sum += vec[i];
    if (sum <= k) {
      vec1[idx] = vec[i];
      idx++;
    } else
      break;
  }
  for (int i = 0; i < n; ++i) {
    for (int j = 0; j < idx; ++j) {
      if (instrument[i] == vec1[j]) {
        vec2[idx2] = i + 1;
        idx2++;
        vec1.erase(vec1.begin() + j);
        idx--;
        break;
      }
    }
  }
  cout << idx2 << endl;
  cout << vec2[0];
  for (int i = 1; i < idx2; ++i) cout << " " << vec2[i];
  return 0;
}
