#include <bits/stdc++.h>
using namespace std;
const int inf = 0x7fffffff;
struct node {
  int x;
  int y;
};
node a[101];
bool cmp(node k, node m) { return k.x < m.x; }
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < n; i++) {
    cin >> a[i].x;
    a[i].y = i + 1;
  }
  sort(a, a + n, cmp);
  queue<int> q;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    if (m >= a[i].x) {
      m -= a[i].x;
      q.push(a[i].y);
      ans++;
    } else
      break;
  }
  cout << ans << endl;
  int first = 0;
  while (!q.empty()) {
    if (first == 0) {
      cout << q.front();
      first = 1;
      q.pop();
    } else {
      cout << " " << q.front();
      q.pop();
    }
  }
  cout << endl;
  return 0;
}
