#include <bits/stdc++.h>
using namespace std;
int findmin(int a[], int n, int b[], int x) {
  int min = a[1], p, f = 0;
  for (int i = 2; i <= n; i++) {
    if (a[i] < min) {
      f = 1;
      min = a[i];
      b[x] = i;
      p = i;
    }
  }
  if (f == 0) {
    a[1] = INT_MAX;
    b[x] = 1;
  } else
    a[p] = INT_MAX;
  return min;
}
int main() {
  int n, k;
  cin >> n >> k;
  int a[n + 1], b[n + 1];
  int i, j = 0, x = 1;
  for (i = 1; i <= n; i++) cin >> a[i];
  int ct = 0;
  for (i = 1; i <= n; i++) {
    if (ct <= k) {
      int l = findmin(a, n, b, x);
      if (ct + l > k) break;
      ct += l;
      j++;
      x++;
    } else
      break;
  }
  cout << j << endl;
  for (i = 1; i <= j; i++) cout << b[i] << " ";
}
