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