#include <bits/stdc++.h>
using namespace std;
int main() {
  int arr[101] = {0};
  int result[101] = {0};
  int n, days, cnt = 0;
  cin >> n >> days;
  for (int i = 1; i <= n; i++) cin >> arr[i];
  for (int i = 1; i <= n; i++) {
    int minV = arr[i];
    int minIdx = i;
    for (int j = 1; j <= n; j++) {
      if (minV >= arr[j]) {
        minV = arr[j];
        minIdx = j;
      }
    }
    if (days - minV < 0) break;
    result[cnt] = minIdx;
    cnt++;
    days -= minV;
    arr[minIdx] = 99999999;
  }
  cout << cnt << endl;
  for (int i = 0; i < cnt; i++) {
    cout << result[i] << " ";
  }
}
