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