#include <bits/stdc++.h>
using namespace std;
int n, k, sm;
vector<int> ans;
int main() {
  cin >> n >> k;
  vector<pair<int, int> > v(n);
  for (int i = 0; i < n; i++) cin >> v[i].first, v[i].second = i + 1;
  sort(v.begin(), v.end());
  for (int i = 0; i < n; i++)
    if (sm + v[i].first <= k) sm += v[i].first, ans.push_back(v[i].second);
  cout << ans.size() << "\n";
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
}
