#include <bits/stdc++.h>
using namespace std;
const int VISITED = 1;
const int UNVISITED = -1;
const long long OO = 1e12;
const int OOI = 1e9;
int xdir[] = {-1, 0, 0, 1};
int ydir[] = {0, -1, 1, 0};
void file() {}
int n, k, arr[100 + 9], vis[100 + 9];
int main() {
  file();
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> arr[i];
  bool yes = 0;
  vector<int> ans;
  for (int i = 0; i < n; i++) {
    int smt = OOI;
    int ind = -1;
    for (int j = 0; j < n; j++) {
      if (smt > arr[j] && !vis[j]) {
        smt = arr[j];
        ind = j + 1;
      }
    }
    if (smt <= k) {
      k -= smt;
      yes = 1;
      vis[ind - 1] = 1;
      ans.push_back(ind);
    } else
      break;
  }
  if (!yes)
    printf("0\n");
  else {
    cout << ((int)(ans).size()) << endl;
    cout << ans[0];
    for (int i = 1; i < ((int)(ans).size()); i++) printf(" %d", ans[i]);
  }
  return 0;
}
