#include <bits/stdc++.h>
using namespace std;
int a[105], p[105];
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    p[i] = i;
  }
  sort(p, p + n, [](int i, int j) { return a[i] < a[j]; });
  int sum = 0, cnt = 0;
  ostringstream s;
  for (int i = 0; i < n; i++)
    if ((sum += a[p[i]]) <= k) {
      cnt++;
      s << p[i] + 1 << ' ';
    }
  cout << cnt << endl;
  cout << s.str() << endl;
  return 0;
}
