#include <bits/stdc++.h>
using namespace std;
long long n, m, p, q, r, i, j, k, x, y, s, t, res, ans;
vector<pair<long long, long long> > v;
vector<long long> vv;
int main() {
  cin >> n >> k;
  for (i = 1; i <= n; i++) {
    cin >> x;
    v.push_back(make_pair(x, i));
  }
  sort(v.begin(), v.end());
  ans = 0;
  res = 0;
  for (i = 0; i < v.size(); i++) {
    ans += v[i].first;
    if (ans > k) {
      break;
    } else
      vv.push_back(v[i].second);
  }
  cout << vv.size() << endl;
  for (i = 0; i < vv.size(); i++) cout << vv[i] << " ";
}
