#include <bits/stdc++.h>
using namespace std;
struct node {
  int id;
  int days;
};
node sum[102];
int ans[102];
bool cmp(node &a, node &b) { return a.days < b.days; }
int main() {
  int n, k, i;
  int k_ans, cot;
  while (cin >> n >> k) {
    k_ans = 0;
    cot = -1;
    for (i = 0; i < n; i++) {
      cin >> sum[i].days;
      sum[i].id = i;
    }
    sum[n].days = 10000;
    sum[n].id = 10000;
    sort(sum, sum + n, cmp);
    if (k < sum[0].days) {
      cout << 0 << endl;
    } else {
      while (k_ans <= k) {
        cot++;
        if (cot > n) break;
        k_ans += sum[cot].days;
      }
      cout << cot << endl;
      for (i = 0; i < cot; i++) ans[i] = sum[i].id;
      sort(ans, ans + cot);
      for (i = 0; i < cot - 1; i++) cout << ans[i] + 1 << " ";
      cout << ans[cot - 1] + 1 << endl;
    }
  }
  return 0;
}
