#include <bits/stdc++.h>
using namespace std;
struct pnt {
  int x, y;
};
bool operator<(pnt x, pnt y) { return x.x < y.x; }
bool operator>(pnt x, pnt y) { return x.x > y.x; }
bool operator==(pnt x, pnt y) { return x.x == y.x; }
int main() {
  int n, k, sum, cnt;
  pnt a[101];
  while (cin >> n) {
    cin >> k;
    for (int i = 0; i < n; ++i) {
      cin >> a[i].x;
      a[i].y = i + 1;
    }
    sort(a, a + n);
    sum = 0;
    for (cnt = 0; cnt < n; ++cnt) {
      if (sum + a[cnt].x <= k)
        sum += a[cnt].x;
      else
        break;
    }
    cout << cnt << endl;
    for (int i = 0; i < cnt; ++i) cout << a[i].y << " ";
    if (cnt > 0) cout << endl;
  }
}
