#include <bits/stdc++.h>
using namespace std;
bool cmp(pair<int, int> a, pair<int, int> b) {
  if (a.second == b.second) return a.first;
  return a.second < b.second;
}
int main() {
  int n, k;
  cin >> n >> k;
  int a[n][n];
  vector<int> v;
  vector<pair<int, int>> vp(n);
  int sum = 0, count = 0;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    vp.push_back(make_pair(i, x));
  }
  sort(vp.begin(), vp.end(), cmp);
  int i = 0;
  while (vp[i].second == 0) i++;
  int x = i - 1;
  for (i = 0; i < vp.size(); i++) {
    if (vp[i].second > 0) {
      sum += vp[i].second;
      if (sum <= k) {
        count++;
        v.push_back(vp[i].first + 1);
      } else
        break;
    }
  }
  cout << count << endl;
  for (auto i : v) cout << i << ' ';
  cout << endl;
}
