#include <bits/stdc++.h>
using namespace std;
template <typename T>
istream &operator>>(istream &in, vector<T> &vec) {
  for (int i = 0; i < vec.size(); ++i) in >> vec[i];
  return in;
}
template <typename T>
ostream &operator<<(ostream &out, const vector<T> &vec) {
  for (int i = 0; i < vec.size(); ++i) out << vec[i] << " ";
  return out;
}
void answer(int v) {
  cout << "YES" << endl;
  exit(0);
}
void err(bool check) {
  if (check)
    cout << "NO" << endl;
  else
    cout << -1 << endl;
  exit(0);
}
const double EPS = 1e-6;
const int INF = 3e5 + 1;
vector<int> x;
bool comp(int a, int b) { return x[a] < x[b]; }
void solve() {
  int a, b;
  cin >> a >> b;
  x.resize(a);
  cin >> x;
  vector<int> y;
  for (int i = 0; i < a; ++i) {
    y.push_back(i);
  }
  sort((y).begin(), (y).end(), comp);
  queue<int> q;
  int i = 0;
  while (i < x.size() && b - x[y[i]] >= 0) {
    q.push(y[i] + 1);
    b -= x[y[i++]];
  }
  cout << q.size() << endl;
  while (!q.empty()) {
    cout << q.front() << " ";
    q.pop();
  }
}
int main() {
  ios::sync_with_stdio(false);
  cout.setf(ios::fixed);
  cout.precision(12);
  solve();
  return 0;
}
