#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  pair<int, int> v[100];
  int n, k, t = 0, c = 0;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> v[i].first;
    v[i].second = i + 1;
  }
  sort(v, v + n);
  for (int i = 0; i < n; i++) {
    t += v[i].first;
    if (t > k) {
      cout << c << endl;
      for (int j = 0; j < i; j++) {
        cout << v[j].second << " ";
      }
      cout << endl;
      return 0;
    }
    c++;
  }
  cout << c << endl;
  for (int i = 0; i < n; i++) {
    cout << v[i].second << " ";
  }
  cout << endl;
  return 0;
}
