#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, s = 0, V[100], n, k, T[100], nb = 0;
  cin >> n >> k;
  for (i = 0; i < n; i++) {
    cin >> T[i];
  }
  for (i = 0; i < n; i++) {
    V[i] = T[i];
  }
  sort(V, V + n);
  for (i = 0; i < n; i++) {
    if (s + V[i] <= k) {
      nb++;
      s += V[i];
    }
  }
  cout << nb << endl;
  for (i = 0; i < nb; i++) {
    for (j = 0; j < n; j++) {
      if (T[j] == V[i]) {
        cout << j + 1 << ' ';
        T[j] = 0;
        break;
      }
    }
  }
  return 0;
}
