#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, i, j, cc = 0, m;
  cin >> n >> m;
  long long ara[n], str[n], res[n];
  for (i = 0; i < n; i++) {
    cin >> ara[i];
    str[i] = ara[i];
  }
  sort(str, str + n);
  cc = 0;
  long long k = 0;
  for (i = 0; i < n; i++) {
    if (m >= str[i])
      m -= str[i];
    else
      break;
    for (j = 0; j < n; j++) {
      if (str[i] == ara[j]) {
        res[k++] = j + 1;
        ara[j] = -1;
        break;
      }
    }
  }
  cout << k << endl;
  for (i = 0; i < k; i++) cout << res[i] << " ";
  return 0;
}
