#include <bits/stdc++.h>
using namespace std;
pair<int, int> a[101010];
vector<int> ans;
int main() {
  ios_base::sync_with_stdio(0);
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; ++i) {
    cin >> a[i].first;
    a[i].second = i;
  }
  sort(a, a + n);
  int i = 0;
  while (k >= 0 && i < n) {
    ans.push_back(a[i].second);
    k -= a[i].first;
    i++;
  }
  if (k >= 0) {
    cout << n << endl;
    for (int i = 0; i < n; ++i) cout << i + 1 << " ";
  } else {
    cout << ans.size() - 1 << endl;
    for (int i = 0; i < ans.size() - 1; ++i) cout << ans[i] + 1 << " ";
  }
  return 0;
}
