#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  pair<int, int> a[n];
  for (int i = 0; i < n; ++i) {
    int x;
    scanf("%d", &x);
    a[i] = make_pair(x, i + 1);
  }
  sort(a, a + n);
  int ans = 0;
  int foo = 0, i;
  for (i = 0; i < n; ++i) {
    foo += a[i].first;
    if (foo <= k)
      ans++;
    else
      break;
  }
  printf("%d\n", ans);
  for (int j = 0; j < i; ++j) {
    printf("%d ", a[j].second);
  }
  return 0;
}
