#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, m, sum;
  pair<int, int> a[105];
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i].first;
    a[i].second = i + 1;
  }
  sort(a, a + n);
  sum = 0;
  m = 0;
  for (int i = 0; i < n; i++) {
    sum += a[i].first;
    m++;
    if (sum > k) {
      sum -= a[i].first;
      m--;
      break;
    }
  }
  cout << m << endl;
  for (int i = 0; i < m; i++) cout << a[i].second << " ";
  cout << endl;
  return 0;
}
