#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
const int N = 1e5 + 2;
int n, k, a[N], d[N], r[N];
int q, ans;
int main() {
  ios_base ::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> k;
  for (int i = 1; i <= n; i++) {
    cin >> a[i];
    r[i] = a[i];
  }
  sort(r + 1, r + n + 1);
  for (int i = 1; i <= n; i++) {
    q += r[i];
    if (q > k) {
      break;
    } else {
      ans++;
      d[i] = r[i];
    }
  }
  cout << ans << "\n";
  for (int i = 1; i <= n; i++) {
    if (d[i] > 0) {
      for (int j = 1; j <= n; j++) {
        if (d[i] == a[j]) {
          cout << j << " ";
          a[j] = 0;
          break;
        }
      }
    }
  }
  return 0;
}
