#include <bits/stdc++.h>
using namespace std;
pair<int, int> x[111];
int sol[111];
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  for (int i = 1; i <= n; ++i) {
    int val;
    scanf("%d", &val);
    x[i] = make_pair(val, i);
  }
  sort(x + 1, x + n + 1);
  for (int i = 1; k > 0 && i <= n; ++i)
    if (k >= x[i].first) {
      sol[++sol[0]] = x[i].second;
      k -= x[i].first;
    } else
      break;
  printf("%d\n", sol[0]);
  for (int i = 1; i <= sol[0]; ++i) printf("%d ", sol[i]);
  return 0;
}
