#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, t;
  cin >> n >> k;
  pair<int, int> c;
  vector<pair<int, int>> d;
  for (int i = 1; i <= n; i++) {
    cin >> t;
    c = make_pair(t, i);
    d.push_back(c);
  }
  sort(d.begin(), d.end());
  int count = 0, sum = 0;
  vector<pair<int, int>>::iterator itr = d.begin();
  for (itr = d.begin(); itr != d.end(); itr++) {
    sum += d[itr - d.begin()].first;
    if (sum > k) break;
    count++;
  }
  cout << count << endl;
  for (int i = 0; i < count; i++) cout << d[i].second << " ";
  return 0;
}
