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