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