#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, sum = 0;
  cin >> n >> k;
  vector<pair<int, int> > a;
  vector<int> r;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    a.push_back(make_pair(x, i + 1));
  }
  sort(a.begin(), a.end());
  for (int i = 0; i < n; i++) {
    if (sum + a[i].first <= k) {
      sum += a[i].first;
      r.push_back(a[i].second);
    } else {
      break;
    }
  }
  cout << r.size() << endl;
  for (auto& c : r) {
    cout << c << " ";
  }
}
