#include <bits/stdc++.h>
using namespace std;
struct project {
  int instruments;
  int days;
} projects[101];
bool cmp(project x, project y) { return x.days < y.days; }
int main() {
  int n, k;
  while (cin >> n >> k) {
    int ans = 0, ansArray[101];
    for (int i = 0; i < n; i++) {
      cin >> projects[i].days;
      projects[i].instruments = i + 1;
    }
    sort(projects, projects + n, cmp);
    for (int i = 0; i < n; i++) {
      if (k >= projects[i].days) {
        k -= projects[i].days;
        ansArray[ans++] = projects[i].instruments;
      } else {
        break;
      }
    }
    cout << ans << endl;
    sort(ansArray, ansArray + ans);
    for (int i = 0; i < ans; i++) {
      cout << ansArray[i] << " ";
    }
    cout << endl;
  }
  return 0;
}
