#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  priority_queue<pair<int, int> > pq;
  ;
  for (int i = 1; i <= n; i++) {
    int temp;
    cin >> temp;
    pq.push(make_pair(-temp, i));
  }
  int sum = 0;
  int flag = 0;
  int ct = 0;
  queue<int> q;
  while (1) {
    if (pq.empty()) break;
    pair<int, int> temp = pq.top();
    pq.pop();
    if (sum - temp.first > k) {
      break;
    }
    ct++;
    sum = sum - temp.first;
    q.push(temp.second);
    flag = 1;
  }
  cout << q.size() << endl;
  while (!q.empty()) {
    printf("%d ", q.front());
    q.pop();
  }
  return 0;
}
