Problem D

One Against Many

The creative department at the PuimTV has just created a new television game: “One Against Many”. In this game, one player plays against a set of opponents. The player and the opponents are collectively called participants. The game proceeds in a sequence of rounds until the player or all his opponents lose.

In each round, the participants should answer a question about some subject. The player or an opponent loses when he answers wrongly. If no participant loses, a new question of the same subject is posed until some participant loses. If the player loses, the game ends and he wins no money. If an opponent loses, he is excluded from the game (i.e., he will not participate in any of the following rounds). In each round, the player can win, at most, a constant amount of money, R. The actual amount of money won by the player is an integer that depends on the number of opponents at the beginning of the round, O, and the number of opponents that lose in the round, L, using the formula: floor(R * L / O) (with floor(x) the largest integer not greater than x).

In the game, there is a fixed set of subjects, {s1, s2, ..., sn}. The subject for each round is given by the following cyclic sequence: s1, s2, ..., sn, s1, s2, ..., sn, s1, ... The subject of the first round is subject s1.

For each subject, si, there is an associated price, pi, with pi a percentage value (0 <= pi < 100). For playing a round with subject si, the player must pay floor(T * pi / 100), with T the total amount of money won by the player since the beginning of the game. In the beginning of the game, T=0.

The financial department of PuimTV is now trying to evaluate the financial impact of the game to decide the number of opponents, the number of subjects and the price of each subject that PuimTV will use. To this end, you have been asked to create a program that computes the maximum amount of money a player can win.

Problem

Given the initial number of opponents, Oinit, in the game, the maximum amount of money a player can win in each round, R, the number of subjects, n, and their prices, pi, your task is to create a program that computes the maximum amount of money a player can win in the “One Against Many” game.

Input

The first line of input contains an integer, Oinit (0 < Oinit <= 2500), that specifies the number of initial opponents.

The second line of input contains an integer, R (Oinit <= R <= 5000), that specifies the amount of money the player can win in each round.

The third line of input contains an integer, n (0 < n <= 50), that specifies the number of different subjects.

Each of the following n input lines contains an integer, pi for line i (0 <= p i< 100, i = 1..n), that specifies the price of each of the n subjects (as defined earlier).

Output

Your program must output the maximum amount of money the player can win.

Sample Input

3
100
2
80
20

Sample Output

153

MIUP'2004: Fourth Portuguese National Programming Contest