#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long t;
  t = 1;
  while (t--) {
    long long n;
    cin >> n;
    long long k;
    cin >> k;
    pair<long long, long long> arr[n];
    for (long long i = 0; i < n; i++) {
      cin >> arr[i].first;
      arr[i].second = i + 1;
    }
    sort(arr, arr + n);
    cout << endl;
    long long count = 0;
    long long i = 0;
    long long sum = 0;
    while (i < n && (sum + arr[i].first) <= k) {
      sum += arr[i].first;
      count++;
      i++;
    }
    cout << count << endl;
    while (count) {
      cout << arr[count - 1].second << " ";
      count--;
    }
    cout << endl;
  }
}
