#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, m = 0, c = 0, j = 0;
  cin >> n >> k;
  vector<pair<int, int> > a(n);
  for (int i = 0; i < n; i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  sort(a.begin(), a.end());
  while (1) {
    c++;
    m += a[j++].first;
    if (m > k) {
      j--, c--;
      break;
    }
    if (j == n) break;
  }
  cout << c << endl;
  for (int i = 0; i < j; i++) cout << a[i].second + 1 << " ";
  cout << endl;
  return 0;
}
