#include <bits/stdc++.h>
int main() {
  int n, k, length, i = 0, sum = 0;
  std::multimap<int, int> data;
  std::cin >> n >> k;
  for (i = 0; i < n; i++) {
    std::cin >> length;
    data.emplace(length, i + 1);
  }
  i = 0;
  for (auto itr = data.begin(); itr != data.end(); itr++) {
    sum += itr->first;
    if (sum > k) {
      break;
    }
    i++;
  }
  std::cout << i << std::endl;
  for (auto itr = data.begin(); i-- > 0; itr++) {
    std::cout << itr->second << ' ';
  }
}
