#include <bits/stdc++.h>
typedef struct tip {
  int deger, sira;
} tip;
int main() {
  int t, p, n, k, i, s = 0, top = 0, e = 0, j, min = 999;
  tip str[150];
  int arr[150], sum[150];
  scanf("%d%d", &n, &k);
  for (i = 0; i < n; i++) {
    scanf("%d", arr + i);
  }
  for (i = 0; i < n; i++) {
    for (j = 0; j < n; j++) {
      if (arr[j] < min) min = arr[j];
    }
    for (j = 0; j < n; j++)
      if (min == arr[j]) {
        t = j + 1;
        arr[j] = 1000;
        break;
      }
    str[i].deger = min;
    str[i].sira = t;
    min = 999;
  }
  for (i = 0; i < n; i++) {
    if (top > k || top + str[i].deger > k) break;
    top += str[i].deger;
    sum[e++] = str[i].sira;
    s++;
  }
  printf("%d\n", s);
  for (i = 0; i < e; i++) printf("%d ", sum[i]);
  return 0;
}
