#include <bits/stdc++.h>
using namespace std;
int n, k, i, s;
pair<int, int> a[105];
vector<int> sol;
int main() {
  cin.sync_with_stdio(false);
  cin >> n >> k;
  for (i = 1; i <= n; i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  sort(a + 1, a + n + 1);
  for (i = 1; i <= n; i++) {
    s += a[i].first;
    if (s > k) break;
    sol.push_back(a[i].second);
  }
  cout << sol.size() << '\n';
  for (auto it : sol) cout << it << " ";
  return 0;
}
