#include <bits/stdc++.h>
int a[150], id[10050];
void quicksort(int *a, int left, int right) {
  int l = left, r = right;
  int rd1 = rand() % 32767 + 1, rd2 = rand() % 32767 + 1;
  int key = (rd1 * rd2) % (right - left + 1) + left;
  int x = a[key];
  while (l <= r) {
    while (a[l] < x) l++;
    while (a[r] > x) r--;
    if (l <= r) {
      int t = a[l];
      a[l] = a[r];
      a[r] = t;
      int tt = id[l];
      id[l] = id[r];
      id[r] = tt;
      l++;
      r--;
    }
  }
  if (left < r) quicksort(a, left, r);
  if (l < right) quicksort(a, l, right);
}
int main() {
  int n, k, u, sum;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; i++) {
    scanf("%d", &a[i]);
    id[i] = i;
  }
  quicksort(a, 1, n);
  sum = 0;
  for (int i = 1; i <= n; i++) {
    if (sum + a[i] <= k) {
      sum = sum + a[i];
      u = i;
    }
  }
  printf("%d\n", u);
  for (int i = 1; i <= u; i++) {
    printf("%d ", id[i]);
  }
  puts("");
  return 0;
}
