#include <bits/stdc++.h>
using namespace std;
vector<int> B;
vector<pair<int, int>> V;
int a, b, c, d, q, ans;
int main() {
  cin >> a >> c;
  for (int i = 0; i < a; i++) {
    cin >> b;
    V.push_back({b, i});
  }
  sort(V.begin(), V.end());
  for (int i = 0; i < a; i++) {
    if (ans + V[i].first < c + 1) ans += V[i].first, B.push_back(i), d++;
    if (ans == c) break;
  }
  cout << d << endl;
  for (int i = 0; i < B.size(); i++) cout << V[i].second + 1 << " ";
}
