#include <bits/stdc++.h>
using namespace std;
int N, K;
pair<int, int> nums[123];
int main() {
  ios_base::sync_with_stdio(false);
  cin >> N >> K;
  for (int i = 0; i < N; ++i) {
    cin >> nums[i].first;
    nums[i].second = i + 1;
  }
  sort(nums, nums + N);
  int ans = 0;
  for (int i = 0; i < N; ++i) {
    if (K - nums[i].first >= 0) {
      ++ans;
      K -= nums[i].first;
    } else
      break;
  }
  cout << ans << '\n';
  for (int i = 0; i < ans; ++i) {
    if (i > 0) cout << " ";
    cout << nums[i].second;
  }
}
