#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n, k, sum = 0;
  cin >> n >> k;
  vector<pair<int, int> > v;
  pair<int, int> p;
  for (int i = 0; i < n; i++) {
    int days;
    cin >> days;
    p.first = days;
    p.second = i + 1;
    v.push_back(p);
  }
  sort(v.begin(), v.end());
  vector<int> idx;
  for (int i = 0; i < v.size(); i++) {
    sum += v[i].first;
    if (sum > k) break;
    idx.push_back(v[i].second);
  }
  cout << idx.size() << endl;
  for (int i = 0; i < idx.size(); i++) cout << idx[i] << " ";
  return 0;
}
