#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  pair<int, int> a[n + 1];
  for (int i = 1; i <= n; i++) scanf("%d", &a[i].first), a[i].second = i;
  sort(a + 1, a + 1 + n);
  int ans = 0, s = 0;
  vector<int> v1;
  for (int i = 1; i <= n; i++) {
    if ((s + a[i].first) <= k)
      s += a[i].first;
    else
      break;
    v1.push_back(a[i].second);
  }
  printf("%d\n", v1.size());
  for (int i = 0; i < v1.size(); i++) printf("%d ", v1[i]);
  return 0;
}
