#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const double EPS = 0.0000001;
const double PI = 3.141592653589793;
const int MAX_N = 100005;
const long long LLINF = 99999999999999999LL;
int N;
pair<int, int> v[MAX_N];
int main() {
  int K;
  cin >> N >> K;
  for (int i = 1; i <= N; ++i) {
    cin >> v[i].first;
    v[i].second = i;
  }
  sort(v + 1, v + N + 1);
  int ans = 0, sum = 0;
  vector<int> sol;
  for (int i = 1; i <= N; ++i)
    if (sum + v[i].first <= K) {
      sum += v[i].first;
      sol.push_back(v[i].second);
    }
  cout << sol.size() << "\n";
  for (int i = 0; i < (int)sol.size(); ++i) cout << sol[i] << " ";
  return 0;
}
