#include <bits/stdc++.h>
using namespace std;
int n, k, s, i;
pair<int, int> arr[111];
int main() {
  cin >> n >> k;
  for (i = 0; i < n; ++i) cin >> arr[i].first, arr[i].second = i;
  sort(arr, arr + n);
  for (i = 0; i < n; ++i)
    if (s + arr[i].first <= k)
      s += arr[i].first;
    else
      break;
  cout << i << endl;
  for (int j = 0; j < i; ++j) cout << arr[j].second + 1 << ' ';
  return EXIT_SUCCESS;
}
