#include <bits/stdc++.h>
using namespace std;
void mergesort(int arr[], int n) {
  if (n != 1 && n != 0) {
    int a1[n - (n / 2)], a2[n / 2];
    for (int j = 0; j < n - (n / 2); j++) a1[j] = arr[j];
    for (int j = 0; j < n / 2; j++) a2[j] = arr[j + n - (n / 2)];
    mergesort(a1, n - (n / 2));
    mergesort(a2, n / 2);
    int i = 0, j = 0, k = 0;
    while (i < (n - (n / 2)) && j < (n / 2)) {
      if (a1[i] < a2[j]) {
        arr[k] = a1[i];
        i++;
      } else {
        arr[k] = a2[j];
        j++;
      }
      k++;
    }
    while (i < n - (n / 2)) {
      arr[k] = a1[i];
      i++;
      k++;
    }
    while (j < n / 2) {
      arr[k] = a2[j];
      j++;
      k++;
    }
  }
}
int main() {
  int n, k;
  cin >> n >> k;
  int *arr = new int[n], *arr2 = new int[n];
  for (int i = 0; i < n; i++) scanf("%d", &arr[i]);
  for (int i = 0; i < n; i++) arr2[i] = arr[i];
  mergesort(arr, n);
  int sum = 0, cnt = 0;
  for (int j = 0; j < n; j++) {
    if (sum <= k - arr[j]) {
      sum += arr[j];
      cnt++;
    } else
      break;
  }
  int cnt2 = 1;
  cout << cnt << endl;
  for (int i = 0; i < cnt; i++) {
    for (int j = 0; j < n; j++) {
      if (arr[i] == arr2[j] && (i + 1 < cnt ? arr[i] != arr[i + 1] : 1) &&
          (cnt2 <= cnt)) {
        cout << j + 1 << " ";
        cnt2++;
      } else
        continue;
    }
  }
  return 0;
}
