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