#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, k;
  cin >> n >> k;
  vector<pair<int, int>> a(n);
  for (int i = 0; i < n; ++i) cin >> a[i].first, a[i].second = (i + 1);
  sort(a.begin(), a.end());
  int c = 0;
  vector<int> b;
  for (int i = 0; i < n; ++i) {
    c++;
    if (k >= a[i].first)
      k -= a[i].first, b.push_back(a[i].second);
    else
      break;
  }
  sort(b.begin(), b.end());
  cout << b.size() << endl;
  for (int i = 0; i < b.size(); ++i) cout << b[i] << ' ';
  return 0;
}
