#include <bits/stdc++.h>
typedef struct node {
  int musicId;
  int needDays;
} instrument;
int totalIns;
int totalDays;
int save[110];
instrument amr[110];
int cmp(const void *a, const void *b) {
  instrument *tempA, *tempB;
  tempA = (instrument *)a;
  tempB = (instrument *)b;
  return tempA->needDays - tempB->needDays;
}
int cmpInt(const void *a, const void *b) { return *(int *)a - *(int *)b; }
int main() {
  int nowCount = 0;
  int tempI = 1;
  scanf("%d%d", &totalIns, &totalDays);
  for (int i = 1; i <= totalIns; i++) {
    amr[i].musicId = i;
    scanf("%d", &amr[i].needDays);
  }
  qsort(&amr[1], totalIns, sizeof(instrument), cmp);
  if (amr[1].needDays > totalDays)
    printf("0");
  else {
    while (nowCount <= totalDays && tempI <= totalIns) {
      nowCount += amr[tempI].needDays;
      if (nowCount <= totalDays) {
        save[tempI] = amr[tempI].musicId;
        tempI++;
      } else
        break;
    }
    printf("%d\n", tempI - 1);
    qsort(&save[1], tempI - 1, sizeof(int), cmpInt);
    for (int i = 1; i < tempI - 1; i++) {
      printf("%d ", save[i]);
    }
    printf("%d", save[tempI - 1]);
  }
  return 0;
}
