#include <bits/stdc++.h>
using namespace std;
int n, k, m;
int b[100005], ct = 0;
pair<int, int> p[104];
int main() {
  scanf("%d %d", &n, &k);
  for (int i = 0; i < n; i++) {
    scanf("%d", &p[i].first);
    p[i].second = i + 1;
  }
  sort(p, p + n);
  int s = 0;
  for (int i = 0; i < n; i++) {
    s = s + p[i].first;
    if (s > k)
      break;
    else {
      b[ct++] = p[i].second;
    }
  }
  cout << ct << "\n";
  for (int j = 0; j < ct; j++) cout << b[j] << " ";
  cout << "\n";
  return 0;
}
