#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, x;
  pair<int, int> arr[110];
  vector<int> v;
  scanf("%d%d", &n, &m);
  for (int i = 0; i < n; i++) {
    scanf("%d", &x);
    arr[i] = pair<int, int>(x, i + 1);
  }
  sort(arr, arr + n);
  for (int i = 0; i < n; i++) {
    if (m - arr[i].first < 0) break;
    m -= arr[i].first;
    v.push_back(arr[i].second);
  }
  printf("%d\n", (int)v.size());
  for (int i = 0; i < v.size(); i++) {
    if (i == v.size() - 1)
      printf("%d\n", v[i]);
    else
      printf("%d ", v[i]);
  }
}
