#include <bits/stdc++.h>
using namespace std;
int n, k;
struct str {
  int ID;
  int d;
};
str a[1000];
bool comp(str a, str b) { return (a.d < b.d); }
int main() {
  int cnt = 0;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    a[i].ID = i + 1;
    cin >> a[i].d;
  }
  sort(a, a + n, comp);
  int p = 0;
  while (p < k) {
    if (p + a[cnt].d > k || cnt == n) {
      break;
    }
    p += a[cnt].d;
    cnt += 1;
  }
  cout << cnt << endl;
  for (int i = 0; i < cnt; i++) cout << a[i].ID << " ";
  cout << endl;
}
