#include <bits/stdc++.h>
using namespace std;
int n, k, sum, i;
pair<int, int> a[110];
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i].first;
    a[i].second = i + 1;
  }
  sort(a, a + n);
  while (sum < k && i < n) {
    sum += a[i].first;
    i++;
  }
  if (sum > k) i--;
  cout << i << "\n";
  for (int j = 0; j < i; j++) cout << a[j].second << " ";
  return 0;
}
