#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int a[1000], a2[1000], a3[1000], sum = 0, j = 0;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    a2[i] = a[i];
  }
  sort(a2, a2 + n);
  for (int i = 0; i < n; i++) {
    if (a2[i] + sum <= k) {
      sum += a2[i];
      a3[j] = a2[i];
      j++;
    }
  }
  cout << j << endl;
  for (int i = 0; i < n; i++) {
    for (int k = 0; k < j; k++) {
      if (a[i] == a3[k]) {
        cout << i + 1 << " ";
        a3[k] = -1;
        break;
      }
    }
  }
  return 0;
}
