#include <bits/stdc++.h>
using namespace std;
const double eps = 1e-9;
int fx[] = {-1, 1, 0, 0, -1, -1, 1, 1};
int fy[] = {0, 0, -1, 1, -1, 1, -1, 1};
int TLx[] = {0, -1, -1, 0};
int TLy[] = {-1, -1, 0, 0};
int TRx[] = {-1, -1, 0, 0};
int TRy[] = {0, 1, 1, 0};
int BLx[] = {0, 1, 1, 0};
int BLy[] = {-1, -1, 0, 0};
int BRx[] = {0, 1, 1, 0};
int BRy[] = {1, 1, 0, 0};
pair<int, int> a[110];
vector<int> res;
int main() {
  int n, k;
  cin >> n >> k;
  for (int i = 0; i < n; i++) {
    cin >> a[i].first;
    a[i].second = i + 1;
  }
  sort(a, a + n);
  for (int i = 0; i < n; i++) {
    if (k >= a[i].first) {
      k -= a[i].first;
      res.push_back(a[i].second);
    }
  }
  int x = res.size();
  cout << x << endl;
  for (int i = 0; i < x; i++) cout << res[i] << ' ';
  return 0;
}
