#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, i, sum = 0;
  cin >> n >> k;
  pair<int, int> pa[105];
  for (i = 0; i < n; i++) {
    cin >> pa[i].first;
    pa[i].second = i + 1;
  }
  sort(pa, pa + n);
  int cnt = 0;
  vector<int> vec;
  for (i = 0; i < n; i++) {
    if (sum + pa[i].first <= k) {
      cnt++;
      vec.push_back(pa[i].second);
      sum += pa[i].first;
    } else
      break;
  }
  cout << cnt << "\n";
  for (i = 0; i < vec.size(); i++) cout << vec[i] << " ";
}
