#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[105];
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> a[i];
  int m = 0;
  while (k > 0 && m < n) {
    int iMin = 0;
    for (int i = 1; i < n; i++)
      if (a[i] != -1 && (a[iMin] == -1 || a[i] < a[iMin])) iMin = i;
    k -= a[iMin];
    if (k >= 0) {
      m++;
      a[iMin] = -1;
    }
  }
  cout << m << endl;
  for (int i = 0; i < n; i++)
    if (a[i] == -1) cout << i + 1 << " ";
  cout << endl;
}
