#include <bits/stdc++.h>
using namespace std;
long long int c, t, n, ar[10005], a[10005], s;
int main() {
  cin >> n >> t;
  for (int i = 0; i < n; i++) {
    cin >> ar[i];
    a[i] = ar[i];
  }
  sort(ar, ar + n);
  for (int i = 0; i < n; i++) {
    s += ar[i];
    if (t < s) break;
    c++;
  }
  cout << c << endl;
  for (int i = 0; i < c; i++) {
    for (int y = 0; y < n; y++) {
      if (ar[i] == a[y]) {
        cout << y + 1 << " ";
        a[y] = -1;
        ar[i] = -1;
        break;
      }
    }
  }
}
