#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<pair<int, int>> vec;
  vector<int> v;
  int n, k, sum = 0, flag = 0;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    vec.push_back(make_pair(x, i));
  }
  sort(vec.begin(), vec.end());
  for (int i = 0; i < n; i++) {
    if (sum + vec[i].first <= k) {
      flag++;
      sum += vec[i].first;
      v.push_back(vec[i].second);
    } else {
      break;
    }
  }
  cout << flag << endl;
  for (int i = 0; i < v.size(); i++) {
    cout << v[i] + 1 << ' ';
  }
  return 0;
}
