#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int sum = 0, i, n, j = 0, k, l;
  cin >> n >> k;
  vector<pair<long long int, int>> v(n);
  for (i = 0; i < n; i++) {
    cin >> v[i].first;
    v[i].second = i + 1;
  }
  sort(v.begin(), v.end());
  for (i = 0; i < n; i++) {
    sum += v[i].first;
    if (sum <= k)
      j++;
    else {
      break;
    }
  }
  cout << j << endl;
  for (i = 0; i < j; i++) cout << v[i].second << " ";
}
