#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  int n, k;
  cin >> n >> k;
  vector<pair<int, int> > arr(n);
  for (int i = 0; i < n; i++) {
    int num;
    cin >> num;
    arr[i] = {num, i};
  }
  sort(arr.begin(), arr.end());
  vector<int> ans;
  long long sum = 0;
  for (int i = 0; i < n; i++) {
    sum += arr[i].first;
    if (sum > k) break;
    ans.emplace_back(arr[i].second);
  }
  cout << ans.size() << endl;
  for (int i = 0; i < ans.size(); i++) cout << ans[i] + 1 << " ";
  return 0;
}
