#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:256000000")
const int dx[] = {1, 0, -1, 0}, dy[] = {0, -1, 0, 1};
const double pi = 3.14159265358979323846264;
using namespace std;
clock_t t;
int INF = 2e9, MAX = -INF, MIN = INF;
pair<int, int> A[101];
int main() {
  int n, k, cnt = 0;
  cin >> n >> k;
  for (int i = 0; i < (int)n; i++) {
    cin >> A[i].first;
    A[i].second = i + 1;
  }
  sort(A, A + n);
  set<int> s;
  for (int i = 0; i < (int)n; i++) {
    k -= A[i].first;
    if (k >= 0) {
      s.insert(A[i].second);
      cnt++;
    } else
      break;
  }
  cout << s.size() << endl;
  for (set<int>::iterator it = s.begin(); it != s.end(); ++it) {
    cout << *it << " ";
  }
  return 0;
}
