#include <bits/stdc++.h>
using namespace std;
const int INF = 0x7fffffff;
struct Node {
  int cost;
  int no;
};
Node a[120];
bool cmp(Node a, Node b) { return a.cost < b.cost; }
int main() {
  int n, k;
  cin >> n >> k;
  int ans = 0;
  int sum = 0;
  for (int i = 0; i < n; ++i) {
    cin >> a[i].cost;
    a[i].no = i;
  }
  sort(a, a + n, cmp);
  for (int i = 0; i < n; ++i) {
    if (sum + a[i].cost <= k) {
      sum += a[i].cost;
      ans++;
    } else
      break;
  }
  cout << ans << endl;
  for (int i = 0; i < ans; ++i) cout << a[i].no + 1 << " ";
  cout << endl;
  return 0;
}
