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