#include <bits/stdc++.h>
using namespace std;
struct st {
  int x, p;
};
bool myfun(st a, st b) { return a.x < b.x; }
int main() {
  int i, sum = 0, c = 0, n, k;
  st a[110];
  cin >> n >> k;
  for (i = 0; i < n; ++i) {
    a[i].p = i + 1;
    cin >> a[i].x;
  }
  sort(a, a + n, myfun);
  for (i = 0; i < n; ++i) {
    sum += a[i].x;
    if (sum > k) break;
    c++;
  }
  cout << c << '\n';
  for (i = 0; i < c; ++i) cout << a[i].p << " ";
  return 0;
}
