#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, t, cnt = 0, flag, cs = 1;
  pair<int, int> A[110];
  scanf("%d %d", &j, &k);
  for (i = 0; i < j; i++) {
    scanf("%d", &A[i].first);
    A[i].second = i + 1;
  }
  sort(A, A + j);
  vector<int> v;
  int sum = 0;
  for (i = 0; i < j; i++) {
    sum += A[i].first;
    if (sum > k) break;
    cnt++;
    v.push_back(A[i].second);
  }
  cout << cnt << endl;
  if (cnt == 0) return 0;
  for (i = 0; i <= cnt - 2; i++) cout << v[i] << " ";
  cout << v[i] << endl;
  return 0;
}
