#include <bits/stdc++.h>
using namespace std;
vector<pair<int, int> > days;
vector<int> visited;
int main() {
  int k, n;
  pair<int, int> temp;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    temp.first = i + 1;
    cin >> temp.second;
    days.push_back(temp);
  }
  for (int i = 0; i < (n - 1); i++) {
    for (int j = 0; j < (n - i - 1); j++) {
      if (days[j].second > days[j + 1].second) swap(days[j], days[j + 1]);
    }
  }
  int total = 0;
  for (int i = 0; i < n; i++) {
    if ((total + days[i].second) <= k) {
      total += days[i].second;
      visited.push_back(days[i].first);
    }
  }
  int sz = visited.size();
  for (int i = 0; i < (sz - 1); i++) {
    for (int j = 0; j < (sz - i - 1); j++) {
      if (visited[j] > visited[j + 1]) swap(visited[j], visited[j + 1]);
    }
  }
  cout << sz << endl;
  for (int i = 0; i < sz; i++) cout << visited[i] << " ";
  cout << endl;
}
