#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  pair<int, int> time[110];
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> time[i].first;
    time[i].second = i + 1;
  }
  int cnt = 0;
  int pos[110];
  sort(time, time + n);
  for (int i = 0; i < n; i++) {
    if (k >= time[i].first) {
      pos[cnt++] = time[i].second;
      k -= time[i].first;
    }
  }
  cout << cnt << '\n';
  for (int i = 0; i < cnt; i++) {
    cout << pos[i] << " ";
  }
  if (cnt) cout << '\n';
  return 0;
}
