#include <bits/stdc++.h>
using namespace std;
int n, k, j, d, b[102];
pair<int, int> p[102];
int main() {
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> p[i].first;
    p[i].second = i;
  }
  sort(p, p + n);
  for (auto i : p) {
    if (d < k) d += i.first, b[j++] = i.second;
  }
  j -= (d > k);
  j = min(j, n);
  cout << j << endl;
  for (int i = 0; i < j; i++) cout << b[i] + 1 << " ";
}
