#include <bits/stdc++.h>
using namespace std;
const int MAX = 10240;
int cmp(pair<int, int> x, pair<int, int> y) { return x.first < y.first; }
pair<int, int> pData[MAX];
int main() {
  int N, K, nTmp, nCnt = 0;
  cin >> N >> K;
  for (int i = 1; i <= N; i++) {
    cin >> nTmp;
    pData[i] = make_pair(nTmp, i);
  }
  sort(pData + 1, pData + N + 1, cmp);
  for (int i = 1; i <= N; i++) {
    if (pData[i].first <= K) {
      K -= pData[i].first;
      nCnt++;
    } else {
      break;
    }
  }
  cout << nCnt << endl;
  for (int i = 1; i <= nCnt; i++) {
    cout << pData[i].second << " ";
  }
  return 0;
}
