#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, i, yes = 0;
  scanf("%d %d", &n, &k);
  pair<int, int> a[n];
  for (i = 0; i < n; ++i) scanf("%d", &a[i].first), a[i].second = i + 1;
  sort(a, a + n);
  for (i = 0; i < n; i++) {
    if (k - a[i].first >= 0)
      k -= a[i].first, yes = 1;
    else
      break;
  }
  if (yes)
    for (int j = 0; j < i; j++) {
      if (!j) cout << i << endl;
      cout << a[j].second << " ";
    }
  else
    puts("0");
  return 0;
}
