#include <bits/stdc++.h>
using namespace std;
const int MAX_N = 100 + 10;
pair<int, int> a[MAX_N];
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> a[i].first, a[i].second = i;
  sort(a, a + n);
  int ans = 0;
  for (int i = 0; i < n && k >= a[i].first; i++, ans++) k -= a[i].first;
  cout << ans << endl;
  for (int i = 0; i < ans; i++) cout << a[i].second + 1 << ' ';
}
