#include <bits/stdc++.h>
using namespace std;
long long n, k;
typedef struct {
  int days;
  int pos;
} instru;
instru ins[101];
bool cmp(instru i1, instru i2) { return (i1.days < i2.days); }
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> ins[i].days;
    ins[i].pos = i;
  }
  sort(ins, ins + n, cmp);
  long long sum = 0;
  int i = 0;
  while (sum + ins[i].days <= k) {
    sum += ins[i].days;
    i++;
    if (i == n) {
      break;
    }
  }
  cout << i << endl;
  for (int j = 0; j < i; j++) {
    cout << ins[j].pos + 1 << " ";
  }
  return 0;
}
