#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<int, int> a, pair<int, int> b) { return a.first < b.first; }
int main(int argc, char const *argv[]) {
  int n, k;
  cin >> n >> k;
  pair<int, int> a[n];
  for (int i = 0; i < n; i++) {
    cin >> a[i].first;
    a[i].second = i + 1;
  }
  sort(a, a + n, cmp);
  int sum = 0;
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    if ((sum + a[i].first) <= k) {
      cnt++;
      sum = sum + a[i].first;
    } else {
      break;
    }
  }
  cout << cnt << endl;
  for (int i = 0; i < cnt; i++) cout << a[i].second << " ";
  cout << endl;
  return 0;
}
