#include <bits/stdc++.h>
using namespace std;
const int OO = 2e9;
const int MOD = 1e9 + 7;
const double Pi = 3.141592653589793;
const int N = 1e5 + 5;
pair<int, int> a[N];
int res[N], n, m = 0, k;
int main() {
  cin >> n >> k;
  for (int i = (int)1; i <= (int)n; i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  sort(a + 1, a + n + 1);
  for (int i = (int)1; i <= (int)n; i++) {
    if (a[i].first > k) break;
    res[++m] = a[i].second;
    k -= a[i].first;
  }
  cout << m << endl;
  for (int i = (int)1; i <= (int)m; i++) cout << res[i] << " ";
}
