#include <bits/stdc++.h>
using namespace std;
struct node {
  int days;
  int index;
};
bool compare(node lhs, node rhs) { return (lhs.days < rhs.days); }
int main() {
  int n, k;
  int sum = 0;
  scanf("%d%d", &n, &k);
  node a[n + 1];
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i].days);
    a[i].index = i;
  }
  sort(a + 1, a + n + 1, compare);
  int i = 1;
  sum = a[i].days;
  while (sum <= k) {
    i++;
    if (i <= n)
      sum += (a[i].days);
    else
      break;
  }
  printf("%d\n", i - 1);
  if (i != 1) {
    for (int j = 1; j < i; j++) printf("%d ", a[j].index);
    printf("\n");
  }
  return 0;
}
