#include <bits/stdc++.h>
using namespace std;
long long int m, n, i, j, y, x = 0, k = 0, q = 0;
long long int func(long long int x[], long long int y) {}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long int a[105] = {0}, i, n, c = 0, k, p[105] = {0};
  long long int f[105] = {0};
  cin >> n >> k;
  for (i = 1; i <= n; i++) {
    cin >> a[i];
    p[i] = a[i];
  }
  sort(a + 1, a + n + 1);
  for (i = 1; i <= n; i++) {
    if (k >= a[i]) {
      c++;
      for (q = 1; q <= n; q++) {
        if (p[q] == a[i]) {
          f[c] = q;
          p[q] = -10;
          break;
        }
      }
      k -= a[i];
    } else {
      break;
    }
  }
  sort(f + 1, f + 1 + c);
  cout << c << endl;
  for (i = 1; i <= c; i++) {
    cout << f[i] << " ";
  }
  return 0;
}
