#include <bits/stdc++.h>
using namespace std;
int a[1000001], b[1000001];
int main() {
  int n, k, i, s = 0, t = 0, j;
  cin >> n >> k;
  for (i = 1; i <= n; i++) cin >> a[i], b[i] = i;
  for (i = 1; i < n; i++)
    for (j = 1; j < n; j++)
      if (a[j] > a[j + 1]) swap(a[j], a[j + 1]), swap(b[j], b[j + 1]);
  for (i = 1; i <= n; i++) {
    if (s >= k) break;
    s += a[i];
    t++;
  }
  if (s > k) t--;
  cout << t << endl;
  for (i = 1; i <= t; i++) cout << b[i] << " ";
  return 0;
}
