#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[101];
  int b[101];
  int t1, n, k;
  scanf("%d %d\n", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    b[i] = i + 1;
  }
  for (int i = 0; i < n; i++)
    for (int j = i + 1; j < n; j++)
      if (a[i] > a[j]) {
        t1 = a[i];
        a[i] = a[j];
        a[j] = t1;
        t1 = b[i];
        b[i] = b[j];
        b[j] = t1;
      }
  int sum = 0;
  t1 = -1;
  for (int i = 0; i < n; i++) {
    if (a[i] + sum > k) break;
    sum += a[i];
    t1 = i;
  }
  printf("%d\n", t1 + 1);
  for (int i = 0; i <= t1; i++) {
    if (i != 0) printf(" ");
    printf("%d", b[i]);
  }
  printf("\n");
  return 0;
}
