#include <bits/stdc++.h>
using namespace std;
typedef struct {
  int pos;
  int day;
} Node;
int cmp(Node a, Node b) { return a.day < b.day; }
int main() {
  int n, days;
  Node p[1000];
  cin >> n >> days;
  for (int i = 1; i <= n; i++) {
    cin >> p[i].day;
    p[i].pos = i;
  }
  sort(p + 1, p + n + 1, cmp);
  int ans = 0;
  int anss = 0;
  int i = 0;
  for (i = 1; i <= n; i++) {
    ans += p[i].day;
    if (ans > days) {
      anss = i - 1;
      break;
    }
  }
  if (i == n + 1) anss = n;
  cout << anss << endl;
  for (i = 1; i <= anss; i++) cout << p[i].pos << " ";
  if (anss != 0) cout << endl;
  return 0;
}
