#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, tot;
  cin >> n >> tot;
  vector<int> v;
  vector<int> v1;
  for (int i = 0; i < n; i++) {
    int x;
    cin >> x;
    v.push_back(x);
    v1.push_back(x);
  }
  sort(v.begin(), v.end());
  int sum = 0;
  vector<int> fin;
  for (int i = 0; i < n; i++) {
    sum += v[i];
    if (sum > tot)
      break;
    else {
      fin.push_back(v[i]);
    }
  }
  cout << fin.size() << endl;
  for (int i = 0; i < fin.size(); i++) {
    for (int x = 0; x < v1.size(); x++) {
      if (fin[i] == v1[x]) {
        cout << x + 1 << " ";
        v1[x] = -11;
        break;
      }
    }
  }
  return 0;
}
