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