#include <bits/stdc++.h>
int comp(const void *i, const void *j);
int main() {
  int n, day, A[101], i, j, k, sum, B[101];
  while (scanf("%d%d", &n, &day) != EOF) {
    for (i = 0; i < n; i++) {
      scanf("%d", &A[i]);
      B[i] = A[i];
    }
    qsort(A, n, sizeof(int), comp);
    sum = 0;
    i = 0;
    while (sum + A[i] <= day && i < n) {
      sum += A[i];
      i++;
    }
    printf("%d\n", i);
    if (sum) {
      for (j = 0; j < i; j++) {
        for (k = 0; k < n; k++) {
          if (B[k] == A[j]) {
            B[k] = 0;
            printf("%d", k + 1);
            break;
          }
        }
        if (j == i - 1)
          printf("\n");
        else
          printf(" ");
      }
    }
  }
  return 0;
}
int comp(const void *i, const void *j) { return *(int *)i - *(int *)j; }
