#include <bits/stdc++.h>
using namespace std;
typedef struct {
  int val;
  int id;
} Instruments;
bool comp(Instruments a, Instruments b) { return (a.val < b.val); }
int main(int argc, char** argv) {
  int n, k, ans = 0, sum = 0;
  cin >> n >> k;
  Instruments I[n];
  for (int i = 0; i < n; i++) {
    cin >> I[i].val;
    I[i].id = i + 1;
  }
  sort(I, I + n, comp);
  int i = 0;
  while ((sum + I[i].val) <= k && i < n) {
    sum += I[i].val;
    ans++;
    i++;
  }
  cout << ans << endl;
  for (int i = 0; i < ans; i++) cout << I[i].id << " ";
  return 0;
}
