#include <bits/stdc++.h>
using namespace std;
long long int i, j, k, t, q, n, m, xm, ym, ii, jj, iii, jjj, row, col;
long long int fl;
string s[1004], s1, s2, s3;
char c[1002][1002], c1;
long long int fco, co, eo, oo, panga, cou;
map<long long int, long long int> map1, map2, map3;
long long int y[3000005], z[100080], yf[1000000], zf[1000000], a[100002][100],
    x[1002][10002];
set<long long int> set1, set2;
vector<pair<long long, long long> > vx[100005], vz;
pair<int, int> pair1[102], pair2;
float floa, flo;
int main() {
  set<long long>::iterator it1, it2, it3;
  flo = 99999999999;
  cin >> n >> k;
  for (i = 1; i <= n; i++) {
    cin >> xm;
    vz.push_back(make_pair(xm, i));
  }
  sort(vz.begin(), vz.end());
  for (i = 0; i < n; i++) {
    co = co + vz[i].first;
    if (co <= k) {
      y[fl] = vz[i].second;
      fl++;
    } else
      break;
  }
  cout << fl << endl;
  for (i = 0; i < fl; i++) {
    cout << y[i] << " ";
  }
  return 0;
}
