#include <bits/stdc++.h>
using namespace std;
class node {
 public:
  int data;
  int index;
};
bool cmp(node a, node b) { return a.data < b.data; }
int32_t main() {
  int n, k, m;
  scanf("%d%d", &n, &k);
  vector<node> v(n);
  for (int i = 0; i < n; i++) {
    scanf("%d", &m);
    v[i].data = m;
    v[i].index = i;
  }
  sort(v.begin(), v.end(), cmp);
  int count = 0;
  m = 0;
  for (int i = 0; i < n; i++) {
    if (count + v[i].data <= k) {
      m++;
      count += v[i].data;
    }
  }
  printf("%d\n", m);
  for (int i = 0; i < m; i++) {
    printf("%d ", v[i].index + 1);
  }
  return 0;
}
