#include <bits/stdc++.h>
using namespace std;
pair<int, int> str[110];
int main() {
  int n, k;
  while (cin >> n >> k) {
    for (int i = 0; i < n; i++) {
      cin >> str[i].first;
      str[i].second = i + 1;
    }
    int ss[110];
    sort(str, str + n);
    int tot = 0;
    for (int i = 0; i < n; i++) {
      tot += str[i].first;
      if (tot > k) {
        n = i;
        break;
      }
      ss[i] = str[i].second;
    }
    cout << n << endl;
    for (int i = 0; i < n; i++) {
      if (i == n - 1)
        cout << ss[i] << endl;
      else
        cout << ss[i] << " ";
    }
  }
  return 0;
}
