#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
const double eps = 1e-8;
const int inf = 0x3f3f3f3f;
int n, m;
pair<int, int> a[120];
vector<int> vec;
int main() {
  int i, j;
  cin >> n >> m;
  int ans = 0;
  for (i = 0; i < n; i++) {
    cin >> a[i].first;
    a[i].second = i + 1;
  }
  sort(a, a + n);
  int sum = 0;
  for (i = 0; i < n; i++) {
    sum += a[i].first;
    if (sum > m) break;
    ans++;
    vec.push_back(a[i].second);
  }
  cout << ans << endl;
  for (i = 0; i < vec.size(); i++) {
    if (i != vec.size() - 1)
      cout << vec[i] << ' ';
    else
      cout << vec[i] << '\n';
  }
  return 0;
}
