#include <bits/stdc++.h>
using namespace std;
void c_p_c() {}
int main(int argc, char const *argv[]) {
  c_p_c();
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, k;
  cin >> n >> k;
  int arr[n], b[n], c[n];
  for (int i = 0; i < n; i++) {
    cin >> arr[i];
    b[i] = arr[i];
  }
  sort(arr, arr + n);
  int sum = 0, cnt = 0, ind = 0;
  for (int i = 0; i < n; i++) {
    sum += arr[i];
    if (sum <= k) {
      cnt++;
      c[ind] = arr[i];
      ind++;
    } else {
      break;
    }
  }
  if (cnt > 0) {
    cout << cnt << endl;
    for (int i = 0; i < cnt; i++) {
      for (int j = 0; j < n; j++) {
        if (c[i] == b[j]) {
          b[j] = 0;
          cout << j + 1 << " ";
          break;
        }
      }
    }
  } else {
    cout << cnt << endl;
  }
}
