#include <bits/stdc++.h>
using namespace std;
int main() {
  int k, n, a[100000], b[100000], ans = 0;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    b[i] = a[i];
  }
  sort(a, a + n);
  for (int i = 0; i < n; i++) {
    if (k > 0 && k - a[i] >= 0) {
      k -= a[i];
      ans++;
    }
  }
  cout << ans << "\n";
  for (int i = 0; i < ans - 1; i++) {
    for (int j = 0; j < n; j++) {
      if (a[i] == b[j]) {
        cout << j + 1 << " ";
        b[j] = -1;
        break;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if (a[ans - 1] == b[i]) {
      cout << i + 1 << '\n';
      break;
    }
  }
}
