#include <bits/stdc++.h>
using namespace std;
const long double pi = 3.14159265359;
const long long MAXN = 1e6 + 9;
const long long mdl = 1000000007LL;
int a[100100], c[100101];
void build(int n, int tl, int tr) {
  if (tl == tr) {
    a[n] = c[tl];
  } else {
    int tm = (tl + tr) / 2;
    build(n * 2, tl, tm);
    build(n * 2 + 1, tm + 1, tr);
    a[n] = a[n * 2] + a[n * 2 + 1];
  }
}
int sum(int n, int tl, int tr, int l, int r) {
  if (l > r) {
    return 0;
  }
  if (tl == l && tr == r) {
    return a[n];
  }
  int tm = (tl + tr) / 2;
  return sum(n * 2, tl, tm, l, min(r, tm)) +
         sum(n * 2 + 1, tm + 1, tr, max(tl, tm + 1), r);
}
int k = 0;
void update(int n, int tl, int tr, int pos, int val) {
  if (pos >= tl && pos <= tr) {
    if (tl == tr) {
      a[n] = val;
    } else {
      int tm = (tl + tr) / 2;
      if (pos <= tm) {
        update(n * 2, tl, tm, pos, val);
      } else {
        update(n * 2 + 1, tm + 1, tr, pos, val);
      }
      a[n] = a[n * 2 + 1] + a[n * 2];
    }
  }
}
int v[100000];
vector<int> f, e;
int main() {
  unsigned long long int a, b, c, ans = 0, d = 0;
  cin >> a >> b;
  for (int i = 1; i <= a; i++) {
    cin >> v[i];
    e.push_back(v[i]);
  }
  sort(v, v + a);
  for (int i = 1; i <= a; i++) {
    if (ans + v[i] <= b) {
      ans += v[i];
      f.push_back(v[i]);
      d++;
    }
  }
  cout << d << endl;
  if (d == 0) {
    return 0;
  }
  ans = 0;
  for (int i = 0; i <= e.size(); i++) {
    for (int j = 0; j <= f.size(); j++) {
      if (f[j] == e[i] && ans < d) {
        ans++;
        cout << i + 1 << " ";
        f[j] == 9876541;
        break;
      }
    }
  }
}
