#include #define int long long using namespace std; int n, a, b; int c[111]; int x[111]; int res; void print(int pos) { if (pos > n) { int sum = 0; int cnt = 0; for (int i = 1; i <= n; i += 1) { if (x[i] == 1) { sum += c[i]; if (sum <= a + b) { cnt += 1; } } } res = max(res, cnt); return; } for (int d = 0; d <= 1; d += 1) { x[pos] = d; print(pos + 1); } } int32_t main() { ios_base::sync_with_stdio(false); cin.tie(NULL); cin >> n >> a >> b; for (int i = 1; i <= n; i += 1) { cin >> c[i]; } print(1); cout << res; return 0; }