#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long MAX = 1e6 + 10;
long long a[MAX];
long long b[MAX];
long long ans[MAX];
long long totol[MAX];
int main() {
  long long n, k, m, sum, t, len;
  string s, d;
  while (cin >> n >> m) {
    int flag = 1;
    ans[0] = 0;
    totol[0] = 0;
    sum = 0;
    t = 0;
    vector<pair<long long, long long> > p;
    for (long long i = (1); i <= (n); ++i) cin >> a[i], p.push_back({a[i], i});
    sort(p.begin(), p.end());
    for (long long i = (1); i <= (n); ++i) {
      sum += p[i - 1].first;
      if (sum <= m) b[++t] = p[i - 1].second;
    }
    if (t == 0)
      cout << t << endl;
    else {
      cout << t << endl;
      for (long long i = (1); i <= (t); ++i) cout << b[i] << ' ';
      cout << endl;
    }
  }
  return 0;
}
