#include <bits/stdc++.h>
using namespace std;
bool decreasing(int x, int y) { return x > y; }
int n, a[101], temp[101], v[101];
int linsearch(int x) {
  int i;
  for (i = 0; i < n; i++) {
    if (temp[i] == x && v[i] == 0) {
      v[i] = 1;
      return i + 1;
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  int i, k, cnt = 0;
  vector<int> ans;
  cin >> n >> k;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    temp[i] = a[i];
    v[i] = 0;
  }
  sort(a, a + n);
  for (i = 0; i < n; i++) {
    cnt = cnt + a[i];
    if (cnt > k) break;
    ans.push_back(linsearch(a[i]));
  }
  cout << ans.size() << '\n';
  for (i = 0; i < ans.size(); i++) {
    cout << ans[i] << " ";
  }
  cout << '\n';
  return 0;
}
