#include <bits/stdc++.h>
using namespace std;
struct Node {
  int day;
  int idx;
};
bool cmp(const Node &A, const Node &B) {
  return A.day < B.day || (A.day == B.day && A.idx < B.idx);
}
int main() {
  int n, k;
  Node data[110];
  vector<int> ans;
  ans.clear();
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> data[i].day;
    data[i].idx = i + 1;
  }
  sort(data, data + n, cmp);
  int start = 0;
  while (k && start < n) {
    if (k >= data[start].day) {
      k -= data[start].day;
      ans.push_back(data[start].idx);
      start++;
    } else {
      break;
    }
  }
  cout << start << endl;
  if (ans.size() > 0) {
    for (int i = 0; i < ans.size() - 1; i++) {
      cout << ans[i] << " ";
    }
    cout << ans[ans.size() - 1] << "\n";
  }
  return 0;
}
