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