#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m;
  pair<int, int> a[100000];
  vector<int> res;
  int i;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> a[i].first;
    a[i].second = i + 1;
  }
  sort(a, a + n);
  for (int i = 0; i < n; i++) {
    if (m < a[i].first) {
      break;
    }
    res.push_back(a[i].second);
    m -= a[i].first;
  }
  cout << res.size() << endl;
  for (int i = 0; i < res.size(); i++) {
    if (i != 0) cout << " ";
    cout << res[i];
  }
  return 0;
}
