#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int *a = new int[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  vector<int> myVector(a, a + n);
  sort(a, a + n);
  vector<int> result;
  int count = 0;
  for (int i = 0; i < n; i++) {
    if (k - a[i] >= 0) {
      count++;
      k -= a[i];
      vector<int>::iterator it = myVector.begin();
      it = find(myVector.begin(), myVector.end(), a[i]);
      int pos = it - myVector.begin();
      if ((it = find(result.begin(), result.end(), pos + 1)) != result.end()) {
        vector<int>::iterator pt;
        pt = find(myVector.begin() + pos, myVector.end(), a[i]);
        if (pt != myVector.end()) {
          result.push_back(pt - myVector.begin());
          myVector[pt - myVector.begin()] = INT_MAX;
          continue;
        }
      }
      result.push_back(pos + 1);
      myVector[pos] = INT_MAX;
    }
  }
  cout << count;
  if (count != 0) {
    cout << endl;
    for (int i = 0; i < result.size(); i++) cout << result[i] << " ";
  }
  return 0;
}
