#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, n, k, s = 0, m;
  vector<pair<int, int> > v(110);
  scanf("%d", &n);
  scanf("%d", &k);
  for (i = 0; i < n; ++i) {
    scanf("%d", &v[i].first);
    v[i].second = i + 1;
  }
  sort(v.begin(), v.begin() + n);
  for (i = 0; s <= k && i < n; ++i) s = s + v[i].first;
  m = i;
  if (s > k) --m;
  printf("%d\n", m);
  for (i = 0; i < m; ++i) printf("%d ", v[i].second);
}
