#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, k;
  cin >> n >> k;
  vector<pair<int, int>> v;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    v.push_back(make_pair(x, i + 1));
  }
  sort(v.begin(), v.end());
  int sum = 0;
  vector<int> vec;
  int c = 0;
  for (int i = 0; i < n; i++) {
    sum += v[i].first;
    if (sum <= k) {
      c++;
      vec.push_back(v[i].second);
    }
  }
  sort(vec.begin(), vec.end());
  cout << c << endl;
  for (int i = 0; i < c; i++) {
    cout << vec[i] << " ";
  }
  cout << endl;
}
