#include <bits/stdc++.h>
using namespace ::std;
int a[150], n;
int m() {
  int minn = a[0];
  int res = 0;
  for (int i = 0; i < n; i++)
    if (minn > a[i]) {
      res = i;
      minn = a[i];
    }
  return res;
}
int main() {
  int k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> a[i];
  int res = 0;
  vector<int> solve;
  while (k > 0) {
    int idx = m();
    if (a[idx] <= k) {
      res++;
      solve.push_back(idx + 1);
      k -= a[idx];
      a[idx] = 10000000;
    } else
      break;
  }
  cout << res << endl;
  for (int i = 0; i < res; i++)
    if (i != res - 1)
      cout << solve[i] << " ";
    else
      cout << solve[i] << endl;
}
