#include <bits/stdc++.h>
using namespace std;
long long a, second[1111111], b[1111111], sum, c[1111], ans, n;
pair<long long, long long> p[111111];
int main() {
  vector<long long> v;
  cin >> a >> n;
  for (int i = 1; i <= a; i++) {
    cin >> p[i].first;
    p[i].second = i;
  }
  sort(p + 1, p + a + 1);
  for (int i = 1; i <= a; i++) {
    sum += p[i].first;
    if (sum <= n) {
      v.push_back(p[i].second);
    }
  }
  cout << v.size() << endl;
  for (int i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
  return 0;
}
