#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, v[101], ord[101], j, i, nr = 0;
  cin >> n >> k;
  for (i = 1; i <= n; i++) {
    cin >> v[i];
    ord[i] = i;
  }
  for (i = 1; i < n; i++)
    for (j = i + 1; j <= n; j++)
      if (v[i] > v[j]) {
        v[i] += v[j];
        v[j] = v[i] - v[j];
        v[i] -= v[j];
        ord[i] += ord[j];
        ord[j] = ord[i] - ord[j];
        ord[i] -= ord[j];
      }
  i = 1;
  while (k > 0 && i <= n) {
    nr++;
    k -= v[i];
    i++;
  }
  if (k < 0) nr--;
  cout << nr << '\n';
  for (i = 1; i <= nr; i++) cout << ord[i] << ' ';
  return 0;
}
