|
Hinata |
I-is this... the place? The ruins...? |
|
Hinata |
It certainly... looks like a ruin, even at a glance... |
|
Koharu |
W-what was that!? Gunshots, all of a sudden!? |
|
Hinata |
It sounds like it's coming from inside the ruins... Is Ui still in there? |
|
Ui |
H-Hinata! Hinata!!! |
|
Hinata |
U-Ui!? What's wrong? |
|
|
Suddenly, ghosts have appeared inside the ruins! The -th ghost has health and defense . To defeat them, I must use my grenades in battle as follows.
The first line contains , , separated by a space.
The second line contains integers , separated by spaces. Here, is the attack power of the -th grenade.
Print the maximum number of ghosts that can be defeated.
Ui
|
I-in there... In there!! |
|
Hinata |
...Hm? In there...? Do you mean inside the ruins? |
|
Hinata |
Could it be what Sensei said they saw earlier...? |
|
Koharu |
It's a ghost!! I-it's coming out! It's coming this way!! |
|
Hinata |
It seems we'll have to deal with this!! (Click) |
|
Koharu |
...!? W-what!? A grenade launcher!? You had that in your bag!? |
|
Hanako |
Oh... Just a moment, Hinata. Firing that in such a confined space might cause a little trouble... |
|
Hinata |
I won't allow you to threaten them!! Please go quietly back where you came from!! |
I need to use the grenades in whatever order I choose to defeat as many ghosts as possible! With these... what is the maximum number of ghosts I can defeat?
Each of the next lines contains integers , separated by a space.