#include <bits/stdc++.h>
using namespace std;
int n, k, aux;
vector<int> ans;
pair<int, int> wub[110];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> wub[i].first;
    wub[i].second = i + 1;
  }
  sort(wub, wub + n);
  for (int i = 0; i < n; i++) {
    aux += wub[i].first;
    if (aux <= k) {
      ans.push_back(wub[i].second);
    } else
      i = n;
  }
  cout << ans.size() << "\n";
  for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
}
