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