#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k;
  cin >> n >> k;
  long long ar[n], arr[n], ot[n];
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
    arr[i] = ar[i];
  }
  ar[n] = '\0';
  arr[n] = '\0';
  ot[n] = '\0';
  sort(arr, arr + n);
  ;
  long long tot = 0, j = 0, p = 0, pp = 0, c = 0;
  tot = arr[0];
  while (tot <= k) {
    c++;
    if (arr[j] != ar[p]) {
      for (int k = 0; k < n; k++) {
        if (arr[j] == ar[k]) {
          ot[pp] = k;
          ar[k] = -5;
          pp++;
          p++;
          break;
        }
      }
    } else {
      ot[pp] = p;
      ar[p] = -5;
      pp++;
      p++;
    }
    j++;
    if (arr[j] <= 0) {
      break;
    }
    tot += arr[j];
  }
  cout << c << '\n';
  for (int i = 0; i < pp; i++) {
    cout << ot[i] + 1 << " ";
  }
  cout << '\n';
  return 0;
}
