#include <bits/stdc++.h>
using namespace std;
int a[1000] = {0};
int indexes[1000] = {0};
bool compare(int i, int j) { return a[i] < a[j]; }
int main() {
  int n = 0, k = 0, i = 0, j = 0, count = 0, sum = 0;
  scanf("%d %d", &n, &k);
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    indexes[i] = i;
  }
  sort(indexes, indexes + n, compare);
  for (i = 0; i < n; i++) {
    sum += a[indexes[i]];
    if (sum <= k) {
      count++;
    } else {
      break;
    }
  }
  printf("%d\n", count);
  for (j = 0; j < i; j++) {
    printf("%d ", indexes[j] + 1);
  }
  printf("\n");
  return 0;
}
