#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<pair<int, int> > G;
  int n, i, k, x, ans = 0, total = 0;
  int a[101];
  cin >> n >> k;
  for (i = 1; i <= n; i++) {
    scanf("%d", &x);
    G.push_back(pair<int, int>(x, i));
  }
  sort(G.begin(), G.end());
  for (i = 0; i < n; i++) {
    pair<int, int> top = G[i];
    int tx = top.first;
    int ty = top.second;
    if (total + tx <= k) {
      total = total + tx;
      ans++;
      a[ans] = ty;
    } else {
      break;
    }
  }
  printf("%d\n", ans);
  for (i = 1; i <= ans; i++) {
    printf("%d ", a[i]);
  }
  printf("\n");
  return 0;
}
