#include <bits/stdc++.h>
using namespace std;
int a, b[110], c[110], ans[10010], ans2, sum, d[110], e, f;
void okat() {
  cin >> a >> e;
  for (int i = 1; i <= a; i++) cin >> b[i], c[i] = b[i];
  sort(b + 1, b + a + 1);
}
int yaz() {
  for (int i = 1; i <= a; i++)
    if (sum + b[i] <= e) sum += b[i], ans2++, d[++f] = b[i];
  e = 1;
  return ans2;
}
int yaz2() {
  for (int i = 1; i <= a; i++)
    if (c[i] == d[e]) {
      e++, c[i] = -1;
      return i;
    }
}
int main() {
  okat();
  cout << yaz() << "\n";
  for (int i = 1; i <= ans2; i++) cout << yaz2() << " ";
}
