#include <bits/stdc++.h>
using namespace std;
int a[100005], b[100005];
int main() {
  int n, k, sum = 0, mn, mn_ind, cnt = 0;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
  }
  while (sum <= k && cnt <= n) {
    mn = 101;
    for (int i = 0; i < n; i++) {
      if (mn > a[i]) {
        mn = a[i];
        mn_ind = i;
      }
    }
    a[mn_ind] = 105;
    b[cnt] = mn_ind;
    cnt++;
    sum = sum + mn;
  }
  cout << cnt - 1 << endl;
  for (int i = 0; i < cnt - 1; i++) {
    cout << b[i] + 1 << " ";
  }
  cout << endl;
  return 0;
}
