#include <bits/stdc++.h>
int a[10000000][2];
int main() {
  int n, k, sum = 0, t, l = 0;
  scanf("%i%i", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%i", &a[i][0]);
    a[i][1] = i + 1;
  }
  for (int j = 0; j < n; j++) {
    for (int i = 0; i < n - 1; i++) {
      if (a[i][0] > a[i + 1][0]) {
        t = a[i][0];
        a[i][0] = a[i + 1][0];
        a[i + 1][0] = t;
        t = a[i][1];
        a[i][1] = a[i + 1][1];
        a[i + 1][1] = t;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if (sum + a[i][0] > k) break;
    sum += a[i][0];
    l++;
    if (sum == k) break;
  }
  printf("%i\n", l);
  for (int i = 0; i < l; i++) {
    printf("%i ", a[i][1]);
  }
}
