#include <bits/stdc++.h>
using namespace std;
map<long long, long long> mp;
void solve() {
  long long a, b, c;
  cin >> a >> b;
  vector<long long> v(a), vc, v1;
  for (long long i = 0; i < a; ++i) {
    cin >> v[i];
  }
  v1 = v;
  sort(v1.begin(), v1.end());
  long long s = 0;
  for (long long i = 0; i < v.size(); ++i) {
    s += v1[i];
    if (s <= b) {
      for (long long j = 0; j < v.size(); ++j) {
        if (v[j] == v1[i] && mp[j] == 0) {
          mp[j]++;
          vc.push_back(j + 1);
          break;
        }
      }
    } else
      break;
  }
  cout << vc.size() << '\n';
  sort(vc.begin(), vc.end());
  for (long long i = 0; i < vc.size(); ++i) {
    cout << vc[i] << ' ';
  }
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n = 1;
  while (n--) {
    solve();
    cout << '\n';
  }
  cerr << "\nTime elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
}
