#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (!b) return a;
  return gcd(b, a % b);
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
static const double pi = acos(-1);
long double answer{0};
int32_t main() {
  vector<pair<int, int>> v;
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  long long n, k;
  cin >> n >> k;
  vector<int> a;
  pair<int, int> pai;
  int temp;
  for (int i = 0; i < n; i++) {
    cin >> temp;
    v.push_back(make_pair(temp, i));
  }
  sort(v.begin(), v.end());
  for (int i = 0; i < v.size(); i++) {
    if (k >= v.at(i).first) {
      k -= v.at(i).first;
      a.push_back(v.at(i).second + 1);
      answer++;
    }
  }
  cout << answer << endl;
  for (int g : a) {
    cout << g << ' ';
  }
  return 0;
}
