#include <bits/stdc++.h>
long long int* create_1d(int n) {
  long long int* arr = (long long int*)malloc(n * sizeof(long long int));
  return arr;
}
int cmpfunc(const void* a, const void* b) { return (*(int*)a - *(int*)b); }
void print(long long int* arr, int n) {
  for (int i = 0; i < n; i++) {
    printf("%lld", arr[i]);
  }
  printf("\n");
}
int find(long long int value, long long int* arr, int n) {
  int k = INT_MIN;
  for (int i = 0; i < n; i++) {
    if (arr[i] == value) {
      arr[i] = k;
      return i + 1;
    }
  }
}
int main() {
  int n, k;
  scanf("%d%d", &n, &k);
  long long int* arr = create_1d(n);
  long long int* arr2 = create_1d(n);
  for (int i = 0; i < n; i++) {
    scanf("%lld", &arr[i]);
  }
  for (int i = 0; i < n; i++) {
    arr2[i] = arr[i];
  }
  qsort(arr, n, sizeof(long long int), cmpfunc);
  int sum = 0;
  int index = 0;
  for (int i = 0; i < n; i++) {
    if (sum + arr[i] <= k) {
      sum += arr[i];
      index++;
    } else {
      break;
    }
  }
  printf("%d", index);
  printf("\n");
  for (int i = 0; i < index; i++) {
    int ans = find(arr[i], arr2, n);
    printf("%d", ans);
    printf(" ");
  }
  return 0;
}
