#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<pair<int, int>> a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i].first;
    a[i].second = i + 1;
  }
  sort(a.begin(), a.end());
  int sum = 0;
  vector<int> an;
  for (int i = 0; i < n; i++) {
    if (a[i].first + sum <= k) {
      an.emplace_back(a[i].second);
      sum += a[i].first;
    } else
      break;
  }
  cout << (int)an.size() << endl;
  for (int i = 0; i < (int)an.size(); i++) {
    cout << an[i] << ' ';
  }
  return 0;
}
