#include <bits/stdc++.h>
using namespace std;
struct muc {
  int d;
  int index;
} mu[200000];
bool cmp(muc a, muc b) { return a.d < b.d; }
int main() {
  int n, m;
  while (cin >> n >> m) {
    int i, j, k;
    for (i = 0; i < n; i++) {
      cin >> mu[i].d;
      mu[i].index = i + 1;
    }
    sort(mu, mu + n, cmp);
    int sum = 0;
    int a[200000];
    k = 0;
    for (i = 0; i < n; i++) {
      if (sum + mu[i].d <= m) {
        sum += mu[i].d;
        a[k++] = mu[i].index;
      }
    }
    cout << k << endl;
    for (j = 0; j < k; j++) {
      if (j == 0)
        cout << a[j];
      else
        cout << " " << a[j];
    }
    if (k == 0) continue;
    cout << endl;
  }
  return 0;
}
