#include <bits/stdc++.h>
using namespace std;
struct music {
  int inds, t;
};
bool cmp(music a, music b) { return a.t < b.t; }
int main() {
  int n, k;
  while (cin >> n >> k) {
    vector<music> vm;
    for (int i = 1; i <= n; ++i) {
      music m;
      m.inds = i;
      cin >> m.t;
      vm.push_back(m);
    }
    sort(vm.begin(), vm.end(), cmp);
    int tot = 0, cnt = 0;
    vector<int> iii;
    for (int j = 0; j < n; ++j) {
      tot += vm[j].t;
      if (tot > k) break;
      ++cnt;
      iii.push_back(vm[j].inds);
    }
    cout << cnt << "\n";
    for (int loop = 0; loop < cnt; ++loop) {
      if (loop)
        cout << " " << iii[loop];
      else {
        cout << iii[loop];
      }
    }
    if (cnt) cout << "\n";
  }
}
