#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, k;
  cin >> n >> k;
  vector<pair<int, int>> a;
  for (int i = 0; i < n; i++) {
    int s;
    cin >> s;
    a.push_back(make_pair(s, i + 1));
  }
  sort(a.begin(), a.end());
  int p = 0;
  for (int i = 0; i < n; i++) {
    if (a[i].first <= k) {
      p++;
      k -= a[i].first;
    } else {
      break;
    }
  }
  cout << p << "\n";
  for (int i = 0; i < p; i++) cout << a[i].second << " ";
  return 0;
}
