#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, aux;
  cin >> n >> k;
  vector<pair<int, int> > v(n);
  pair<int, int> p;
  for (int i = 0; i < n; ++i)
    cin >> aux, p.first = aux, p.second = i + 1, v[i] = p;
  sort(v.begin(), v.end());
  int sum = 0;
  int i = 0;
  while (sum < k && i < n) {
    sum += v[i].first;
    ++i;
  }
  if (sum > k) sum -= v[i--].first;
  cout << i << endl;
  if (i > 0) {
    cout << v[0].second;
  }
  for (int x = 1; x < i; ++x) cout << " " << v[x].second;
  cout << endl;
  return 0;
}
