#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    int k;
    cin >> k;
    int arr[1000];
    vector<pair<int, int> > vec;
    for (int i = 0; i < n; i++) {
      cin >> arr[i];
      vec.push_back({arr[i], i});
    }
    int sum = 0;
    vector<int> vec1;
    sort(vec.begin(), vec.end());
    for (int i = 0; i < n; i++) {
      if (sum + vec[i].first <= k) {
        sum += vec[i].first;
        vec1.push_back(vec[i].second + 1);
      } else
        break;
    }
    cout << vec1.size() << endl;
    for (int i = 0; i < vec1.size(); i++) cout << vec1[i] << " ";
    cout << endl;
  }
}
