#include <bits/stdc++.h>
using namespace std;
int main() {
  pair<int, int> p[100000];
  int n, ans = 0, a, k, c = 0, i;
  scanf("%d %d", &n, &k);
  for (i = 0; i < n; i++) scanf("%d", &a), p[i] = make_pair(a, i);
  sort(p, p + n);
  for (i = 0; i < n; i++) {
    if ((p[i].first + ans) <= k) c++, ans += p[i].first;
  }
  printf("%d\n", c);
  for (i = 0; i < c; i++) printf("%d ", p[i].second + 1);
}
