#include <bits/stdc++.h>
using namespace std;
struct st {
  int a;
  int b;
};
bool cmp(st x, st y) { return (x.a < y.a); }
bool cmp1(st x, st y) { return (x.b < y.b); }
int main() {
  struct st s[1000];
  int n, m, k, i, j, l, x, cnt = 0;
  cin >> n >> k;
  for (i = 0; i < n; i++) {
    cin >> x;
    s[i].a = x;
    s[i].b = i + 1;
  }
  sort(s, s + n, cmp);
  for (i = 0; i < n; i++) {
    if (s[i].a <= k) {
      k -= s[i].a;
      m = i;
      cnt++;
    }
  }
  if (cnt == 0) {
    cout << "0" << endl;
    return 0;
  }
  sort(s, s + (m + 1), cmp1);
  cout << cnt << endl;
  for (i = 0; i <= m; i++) {
    cout << s[i].b << " ";
  }
  cout << endl;
  return 0;
}
