#include <bits/stdc++.h>
using namespace std;
int n, k, l, m;
pair<int, int> el[101];
long long g, d;
int main() {
  cin >> n >> m;
  for (int i = 0; i < n; ++i) {
    cin >> el[i].first;
    el[i].second = i;
  }
  sort(el, el + n);
  g = 0;
  for (k = 0; k < n; ++k) {
    if (g + el[k].first <= m)
      g += el[k].first;
    else
      break;
  }
  cout << k << endl;
  for (int i = 0; i < k; ++i) cout << el[i].second + 1 << " ";
  return 0;
}
