#include <bits/stdc++.h>
const int max = 1e5 + 10;
using namespace std;
int main() {
  long long n, m, count = 0;
  cin >> n >> m;
  pair<int, int> a[n + 5];
  for (int i = 0; i < n; i++) {
    cin >> a[i].first;
    a[i].second = i;
  }
  sort(a, a + n);
  for (int i = 0; i < n; i++) {
    m -= a[i].first;
    if (m >= 0)
      count++;
    else
      break;
  }
  cout << count << endl;
  if (count == 0) return 0;
  for (int i = 0; i < n; i++) {
    if (count--) {
      cout << a[i].second + 1 << " ";
    } else
      break;
  }
}
