#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  vector<pair<int, int> > arr;
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    arr.push_back(make_pair(x, i + 1));
  }
  sort(arr.begin(), arr.end());
  int days = 0;
  vector<int> a;
  for (int i = 0; i < n; ++i) {
    if (days + arr[i].first > k) break;
    days += arr[i].first;
    a.push_back(arr[i].second);
  }
  cout << a.size() << '\n';
  for (int i = 0; i < a.size(); ++i) cout << a[i] << ' ';
  cout << '\n';
}
