Under construction

Still being built. Things may change

Overkill

Time limit0.5sMemory limit1024 MB

Summary
Count the turns needed to kill all monsters when each turn deals D damage and passes p percent of any overkill to the next monster.
Level

Easy2 of 10

Topics
Simulation, Implementation
Solved
No attempts yet

Problem

cologne is playing a game called Trimps. The game has NN monsters lined up in order. The current health of the ii-th monster is AiA_i. Dealing xx damage to a monster reduces its health by xx, and if its health drops to 00 or below, the monster dies. cologne's goal is to kill every monster through battle. A battle consists of several turns, and each turn works as follows. 1. Find the first monster whose health is above 00 and deal DD damage to it. 2. If the damaged monster's health becomes −h-h, which is below 00, overkill happens. Overkill is handled as follows. If the damaged monster has no next monster, the turn ends. If a next monster exists, deal damage equal to pp percent of hh, rounded down to an integer, to the next monster. How many turns are needed to kill all monsters?

Input

The first line contains the number of monsters NN, the base damage DD, and the overkill ratio pp, separated by spaces. (1≤N,D,p≤100)(1 \le N, D, p \le 100) The next NN lines contain the health values A1,A2,⋯ ,ANA_1, A_2, \cdots, A_N of each monster, separated by spaces. (1≤Ai≤100)(1 \le A_i \le 100) All given numbers are integers.

Output

Print the number of turns needed to kill all monsters.

Hint

Overkill happens only once per turn. In other words, one turn cannot deal damage to three or more monsters.

Examples1

  1. Example 1

    Input
    7 20 15
    30 21 1 2 30 22 3
    
    Expected output
    9