#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  long long n, k;
  cin >> n >> k;
  vector<pair<long long, long long>> ans;
  vector<long long> v;
  for (int i = 0; i < n; ++i) {
    int x;
    cin >> x;
    ans.push_back(make_pair(x, i));
  }
  sort(ans.begin(), ans.end());
  long long sum = 0;
  for (int i = 0; i < n; ++i) {
    if (sum + ans[i].first > k) {
      break;
    } else {
      sum += ans[i].first;
      v.push_back(ans[i].second + 1);
    }
  }
  cout << v.size() << "\n";
  for (int i = 0; i < v.size(); ++i) cout << v[i] << " ";
  return 0;
}
