#include <bits/stdc++.h>
using namespace std;
int main() {
  pair<int, int> skd[105];
  int a, b, k = 1, num, cnt = 0, res = 0;
  cin >> a >> b;
  for (int i = 0; i < a; i++) {
    cin >> num;
    skd[i].first = num;
    skd[i].second = i + 1;
  }
  sort(skd, skd + a);
  for (int i = 0; i < a; i++) {
  }
  cnt = 0;
  for (int i = 0; i < a; i++) {
    if (res + skd[i].first <= b) {
      res += skd[i].first;
      cnt++;
    } else
      break;
  }
  cout << cnt << endl;
  for (int i = 0; i < cnt; i++) {
    cout << skd[i].second << " ";
  }
  return 0;
}
