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