#include <bits/stdc++.h>
using namespace std;
bool compare(const pair<int, int>& i, const pair<int, int>& j) {
  return i.first < j.first;
}
int main() {
  vector<pair<int, int> > v;
  pair<int, int> p;
  int n, k, c = 0, x;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> p.first;
    p.second = i + 1;
    v.push_back(p);
  }
  sort(v.begin(), v.end(), compare);
  for (int i = 0; i < n; i++) {
    if (v[i].first <= k) {
      c++;
      k = k - v[i].first;
    }
  }
  cout << c << endl;
  for (int i = 0; i < c; i++) {
    cout << v[i].second << " ";
  }
}
