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