#include <bits/stdc++.h>
using namespace std;
struct inst {
  int i, days;
};
bool compare(inst a, inst b) { return a.days < b.days; }
int main() {
  int n, k;
  cin >> n >> k;
  inst a[n];
  int sum = 0;
  vector<inst> taken;
  for (int i = 0; i < n; i++) {
    int d;
    cin >> d;
    sum += d;
    a[i].days = d;
    a[i].i = i + 1;
  }
  if (k >= sum) {
    cout << n << endl;
    for (int i = 0; i < n; i++) {
      cout << i + 1;
      if (i != n - 1) cout << " ";
    }
    return 0;
  }
  sort(a, a + n, compare);
  int i = 0;
  sum = 0;
  while (sum <= k) {
    sum += a[i].days;
    taken.push_back(a[i]);
    i++;
  }
  int si = taken.size();
  cout << si - 1;
  if (si - 1 == 0) return 0;
  cout << endl;
  for (int i = 0; i < si - 1; i++) {
    cout << taken[i].i;
    if (i != si - 2) cout << " ";
  }
  return 0;
}
