#include <bits/stdc++.h>
using namespace std;
int a[105], b[105];
int main() {
  int n, k;
  int i, j, l;
  cin >> n >> k;
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
    b[i] = a[i];
  }
  sort(b, b + n);
  int count = 0;
  for (j = 0; j < n; j++)
    if (k - b[j] < 0)
      break;
    else {
      k -= b[j];
      count++;
    }
  if (!count)
    cout << "0\n";
  else {
    cout << count << endl;
    int p = 0;
    for (i = 0; i < n; i++) {
      for (l = 0; l < j; l++) {
        if (a[i] == b[l]) {
          if (!p) {
            cout << i + 1;
            p++;
            break;
          } else {
            cout << " " << i + 1;
            p++;
            break;
          }
        }
      }
      if (p == count) break;
    }
    cout << "\n";
  }
}
