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