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