#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k, Num = 0;
  int A[1001], B[1001], C[1001];
  int temp;
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> A[i];
    B[i] = i;
  }
  for (int i = 1; i <= n - 1; i++)
    for (int j = i + 1; j <= n; j++) {
      if (A[i] > A[j]) {
        temp = A[i];
        A[i] = A[j];
        A[j] = temp;
        temp = B[i];
        B[i] = B[j];
        B[j] = temp;
      }
    }
  for (int i = 1; i <= n; i++) {
    k -= A[i];
    if (k < 0) break;
    Num++;
    C[Num] = B[i];
  }
  cout << Num << endl;
  for (int i = 1; i <= Num; i++) cout << C[i] << " ";
  return 0;
}
