#include <bits/stdc++.h>
using namespace std;
pair<int, int> a[110];
vector<int> sol;
int main() {
  int n, k;
  scanf("%d %d", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%d", &a[i].first);
    a[i].second = i + 1;
  }
  sort(a, a + n);
  int w = 0;
  while (k >= a[w].first && w < n) {
    k -= a[w].first;
    sol.push_back(a[w++].second);
  }
  printf("%d\n", sol.size());
  for (vector<int>::iterator it = sol.begin(); it != sol.end(); it++)
    printf("%d ", *it);
  return 0;
}
