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