#include <bits/stdc++.h>
using namespace ::std;
int medo[6000];
int ans[6000];
int main() {
  int n, k;
  cin >> n >> k;
  pair<int, int> p[n + 1];
  for (int i = 0; i < n; i++) {
    cin >> p[i].first;
    p[i].second = i;
  }
  sort(p, p + n);
  vector<int> v;
  int curr = 0;
  for (int i = 0; i < n; i++) {
    if (curr + p[i].first <= k) {
      curr += p[i].first;
      v.push_back(p[i].second);
    }
  }
  cout << v.size() << endl;
  for (int i = 0; i < v.size(); i++) {
    cout << v[i] + 1 << " ";
  }
}
