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