#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, sum = 0;
  cin >> n >> k;
  pair<int, int> p[n];
  for (int i = 0; i < n; i++) {
    cin >> p[i].first;
    p[i].second = i + 1;
  }
  sort(p, p + n);
  for (int i = 0; i < n; i++) {
    k -= p[sum].first;
    if (k >= 0)
      sum++;
    else
      break;
  }
  cout << sum << endl;
  for (int i = 0; i < sum; i++) {
    cout << p[i].second << " ";
  }
  return 0;
}
