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