#include <bits/stdc++.h>
using namespace std;
long long n, m, a[111111], res, k;
vector<long long> ans;
int main() {
  cin >> n >> m;
  for (long long i = 1; i <= n; i++) {
    cin >> a[i];
  }
  for (long long i = 1; i <= n; i++) {
    long long minn = *min_element(a + 1, a + 1 + n);
    res += minn;
    if (res > m) {
      break;
    }
    for (long long j = 1; j <= n; j++) {
      if (a[j] == minn) {
        a[j] = 99999999;
        ans.push_back(j);
        break;
      }
    }
  }
  cout << ans.size() << "\n";
  for (long long i = 0; i < ans.size(); i++) {
    cout << ans[i] << " ";
  }
  return 0;
}
