#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n, m;
  cin >> n;
  cin >> m;
  pair<int, int> a;
  vector<pair<int, int> > arr;
  for (int i = 0; i < n; i++) {
    int temp;
    cin >> temp;
    a = make_pair(temp, i + 1);
    arr.push_back(a);
  }
  sort(arr.begin(), arr.end());
  int ix = 0, sum = 0;
  for (ix = 0; ix < n; ix++) {
    sum = sum + arr[ix].first;
    if (sum > m) {
      break;
    }
  }
  if (ix == 0)
    cout << "0" << endl;
  else {
    cout << ix << endl;
    for (int ii = 0; ii < ix; ii++) cout << arr[ii].second << " ";
    cout << endl;
  }
  return 0;
}
