#include <bits/stdc++.h>
using namespace std;
void c_p_c() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int main() {
  c_p_c();
  int n, k;
  cin >> n >> k;
  vector<pair<int, int>> v(n);
  for (int i = 0; i <= n - 1; i++) {
    int ele;
    cin >> ele;
    v[i].first = ele;
    v[i].second = i + 1;
  }
  sort(v.begin(), v.end());
  int sum = 0;
  int ind = -1;
  for (int i = 0; i < n && k > 0; i++) {
    sum += v[i].first;
    if (sum <= k) {
      ind = i;
    }
  }
  cout << ind + 1 << endl;
  for (int i = 0; i <= ind; i++) cout << v[i].second << " ";
  return 0;
}
