#include <bits/stdc++.h>
using namespace std;
int n, k, a[101010], sum, ans;
pair<int, int> p[10101];
int main() {
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    p[i] = {a[i], i};
  }
  sort(p + 1, p + 1 + n);
  for (int i = 1; i <= n; i++) {
    sum += p[i].first;
    if (sum > k) break;
    ans++;
  }
  cout << ans << "\n";
  for (int i = 1; i <= ans; i++) cout << p[i].second << " ";
}
