#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, a[100], b[100], sum = 0;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i];
    b[i] = a[i];
  }
  sort(a, a + n);
  int c = 0;
  for (c; c < n; c++) {
    if (sum + a[c] > k) break;
    sum += a[c];
  }
  cout << c << endl;
  for (int i = 0; i < c; i++) {
    for (int w = 0; w < n; w++) {
      if (a[i] == b[w]) {
        b[w] = -1;
        cout << w + 1 << " ";
        break;
      }
    }
  }
}
