#include <bits/stdc++.h>
using namespace std;
struct Data {
  int num;
  int pos;
};
bool cmp(Data a, Data b) { return a.num < b.num; }
int main() {
  int n, k;
  Data a[110];
  cin >> n >> k;
  for (int i = 0; i < n; ++i) {
    cin >> a[i].num;
    a[i].pos = i + 1;
  }
  sort(a, a + n, cmp);
  int sum = 0;
  if (a[0].num > k)
    cout << "0" << endl;
  else {
    for (int i = 0; i < n; ++i) {
      if (a[i].num <= k) {
        k -= a[i].num;
        ++sum;
      }
    }
    cout << sum << endl;
    for (int i = 0; i < sum; ++i)
      if (i != sum - 1)
        cout << a[i].pos << " ";
      else
        cout << a[i].pos << endl;
  }
}
