#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, x, y, arr[10001], num = 0, sum = 0, done = 0, dne[10001],
                           befsort[10001], days = 0, gotme[101];
  cin >> x >> y;
  for (a = 0; a < x; a++) {
    cin >> arr[a];
    befsort[a] = arr[a];
    days += arr[a];
  }
  int vv = 0;
  sort(arr, arr + a);
  if (arr[0] > y)
    cout << 0 << endl;
  else if (days <= y) {
    cout << x << endl;
    for (int jo = 0; jo < x; jo++) cout << jo + 1 << " ";
  } else {
    for (int z2 = 0; z2 < a; z2++) {
      for (int z = z2; z < a; z++) {
        dne[vv] = arr[z];
        num++;
        vv++;
        if (gotme[z] != 900) {
          sum += arr[z];
          gotme[z] = 900;
        };
        if (sum == y) {
          done++;
          break;
        }
      }
      if (done >= 1) {
        break;
      }
      sum = 0;
      vv = 0;
      num = 0;
    }
    if (done == 0) {
      sum = 0;
      num = 0;
      int uo = 0;
      for (int tt = 0; tt < x; tt++) {
        num++;
        sum += arr[tt];
        if (sum >= y) {
          break;
        }
      }
      cout << num - 1 << endl;
      for (int kk = 0; kk < num - 1; kk++) {
        for (int ii = 0; ii < x; ii++) {
          if (arr[kk] == befsort[ii]) {
            cout << ii + 1 << " ";
            befsort[ii] = 900;
            break;
          }
        }
      }
    } else {
      cout << num << endl;
      for (int kk = 0; kk < vv; kk++) {
        for (int ii = 0; ii < x; ii++) {
          if (dne[kk] == befsort[ii]) {
            cout << ii + 1 << " ";
            befsort[ii] = 900;
            break;
          }
        }
      }
    }
  }
}
