#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 111;
int n, k;
struct NODE {
  int days, idx;
  bool operator<(const NODE& b) const { return days < b.days; }
};
NODE a[MAX_N];
int main() {
  scanf("%d%d", &n, &k);
  vector<int> ans;
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i].days);
    a[i].idx = i + 1;
  }
  sort(a, a + n);
  for (int i = 0; i < n; i++) {
    if (k - a[i].days >= 0) {
      ans.push_back(a[i].idx);
      k -= a[i].days;
    }
  }
  sort(ans.begin(), ans.end());
  printf("%d\n", ans.size());
  for (int i = 0; i < ans.size(); i++) {
    printf(i == ans.size() - 1 ? "%d\n" : "%d ", ans[i]);
  }
  return 0;
}
