#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1);
pair<int, int> arr[105];
vector<int> v;
int main() {
  ios_base::sync_with_stdio(0);
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  int n, k, m = 0, sum = 0;
  cin >> n >> k;
  for (int i = 0; i < n; ++i) cin >> arr[i].first, arr[i].second = i + 1;
  sort(arr, arr + n);
  for (int i = 0; i < n; ++i)
    if (sum + arr[i].first <= k)
      m++, v.push_back(arr[i].second), sum += arr[i].first;
  cout << m << "\n";
  for (int i = 0; i < m; ++i) cout << v[i] << " ";
  return 0;
}
