시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB141785950.862%

문제

You have a diet plan for the next $N$ days (numbered from $1$ to $N$). During day $i$, you need to drink exactly $P_i$ mL of milk. Alternatively, you can consume a biscuit instead, as a replacement for milk on that day.

Currently, you only have $M$ mL of milk and $K$ biscuits. If there is not enough milk to drink on a day and you run out of biscuits, then your diet plan stops.

Determine the maximum number of days you can maintain your diet plan.

입력

The first line consists of three integers $N$ $M$ $K$ ($1 ≤ N ≤ 100$; $0 ≤ M, K ≤ 100$).

The next line consists of $N$ integers $P_i$ ($1 ≤ P_i ≤ 100$).

출력

Output a single integer representing the maximum number of days you can maintain your diet plan.

예제 입력 1

7 100 2
70 30 20 40 50 40 10

예제 출력 1

5

You can consume a biscuit on day $1$ and $4$ to maintain your diet plan for $5$ days.

예제 입력 2

7 70 1
70 30 40 20 50 10 60

예제 출력 2

3

You can consume a biscuit on day $1$ to maintain your diet plan for $3$ days.

예제 입력 3

7 0 100
100 100 100 100 100 100 100

예제 출력 3

7

예제 입력 4

7 0 0
1 1 1 1 1 1 1

예제 출력 4

0