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