#include <bits/stdc++.h>
using namespace std;
bool sortinrev(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.first < b.first);
}
int main() {
  int n, k;
  cin >> n >> k;
  vector<pair<int, int>> vec(n);
  for (int i = 0; i < n; ++i) {
    cin >> vec[i].first;
    vec[i].second = i + 1;
  }
  sort(vec.begin(), vec.end(), sortinrev);
  int count = 0;
  vector<int> ve;
  for (int i = 0; i < n; ++i) {
    if (k - vec[i].first >= 0) {
      ++count;
      k -= vec[i].first;
      ve.push_back(vec[i].second);
    }
  }
  cout << count << endl;
  for (int i = 0; i < ve.size(); ++i) {
    cout << ve[i] << " ";
  }
}
