#include <bits/stdc++.h>
using namespace std;
int n, k, ans, i, j, mx, sum;
struct qwe {
  int value, pos;
} a[10001];
int d[20001];
bool cmp(qwe a, qwe b) { return a.value < b.value; }
int main() {
  srand(time(NULL));
  cin >> n >> k;
  for (i = 1; i <= n; i++) {
    cin >> a[i].value;
    a[i].pos = i;
  }
  sort(a + 1, a + n + 1, cmp);
  sum = 0;
  for (i = 1; i <= n; i++)
    if (sum + a[i].value <= k) sum += a[i].value, d[++mx] = a[i].pos;
  cout << mx << endl;
  for (i = 1; i <= mx; i++) cout << d[i] << ' ';
}
