#include <bits/stdc++.h>
using namespace std;
struct point {
  int weizhi;
  int shu;
};
point p[105];
bool cmp(point a, point b) { return a.shu < b.shu; }
int main() {
  int i, sum = 0, n, k;
  scanf("%d %d", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &p[i].shu);
    p[i].weizhi = i;
  }
  sort(p + 1, p + 1 + n, cmp);
  for (i = 1; i <= n; i++) {
    sum += p[i].shu;
    if (sum > k) {
      sum -= p[i].shu;
      break;
    }
  }
  i--;
  printf("%d", i);
  for (int j = 1; j <= i; j++) {
    if (j == 1) printf("\n");
    printf("%d ", p[j].weizhi);
  }
}
