{"problem":{"name":"Potions","description":{"content":"Naohiro has a monster. The monster's current health is $H$.   He also has $N$ kinds of potions, numbered from $1$ to $N$ in ascending order of effectiveness.   If you give the monster potion $n$, its ","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc317_a"},"statements":[{"statement_type":"Markdown","content":"Naohiro has a monster. The monster's current health is $H$.  \nHe also has $N$ kinds of potions, numbered from $1$ to $N$ in ascending order of effectiveness.  \nIf you give the monster potion $n$, its health will increase by $P_n$. Here, $P_1 \\lt P_2 \\lt \\dots \\lt P_N$.\nHe wants to increase the monster's health to $X$ or above by giving it one of the potions.  \nPrint the number of the least effective potion that can achieve the purpose. (The constraints guarantee that such a potion exists.)\n\n## Constraints\n\n*   $2 \\leq N \\leq 100$\n*   $1 \\leq H \\lt X \\leq 999$\n*   $1 \\leq P_1 \\lt P_2 \\lt \\dots \\lt P_N = 999$\n*   All input values are integers.\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$ $H$ $X$\n$P_1$ $P_2$ $\\dots$ $P_N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc317_a","tags":[],"sample_group":[["3 100 200\n50 200 999","2\n\nBelow is the change in the monster's health when one of the potions is given to the monster.\n\n*   If potion $1$ is given, the monster's health becomes $100 + 50 = 150$.\n*   If potion $2$ is given, the monster's health becomes $100 + 200 = 300$.\n*   If potion $3$ is given, the monster's health becomes $100 + 999 = 1099$.\n\nThe potions that increase the monster's health to at least $X = 200$ are potions $2$ and $3$. The answer is the least effective of them, which is potion $2$."],["2 10 21\n10 999","2"],["10 500 999\n38 420 490 585 613 614 760 926 945 999","4"]],"created_at":"2026-03-03 11:01:14"}}