#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e2 + 20;
int a[MAXN], b[MAXN];
vector<int> vecI;
int main() {
  int n, k, ans = 0, meghdar = 0;
  cin >> n >> k;
  for (int i = 0; i < n; i++) cin >> a[i];
  for (int i = 0; i < n; i++) b[i] = a[i];
  sort(b, b + n);
  for (int i = 0; i < n; i++) {
    if (meghdar + b[i] > k) break;
    meghdar += b[i];
    ans++;
    for (int j = 0; j < n; j++) {
      if (a[j] == b[i]) {
        vecI.push_back(j + 1);
        a[j] = -1;
        break;
      }
    }
  }
  cout << ans << endl;
  for (int i = 0; i < ans; i++) cout << vecI.at(i) << " ";
  return 0;
}
