403789: GYM101306 B Chocolate

Memory Limit:64 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

B. Chocolatetime limit per test2 secondsmemory limit per test64 megabytesinputstandard inputoutputstandard output

It's finally dessert time! You have k bars of chocolate of different brands: Twix, Galaxy, Mars, MilkyWay, KitKat, etc... You also have n humans and m Martians to feed.

Each living creature will be satisfied with a single bar of chocolate. However, Martians refuse to eat Mars (something about cannibalism?).

How many extra bars, if any, do you need to buy to satisfy everyone?

Input

The first line of the input consists of 3 space-separated integers, k, n,  and m (1 ≤ k, n, m ≤ 105).

Each of the next k lines contains a string. These represent the brands of chocolate bars you initially have, in no particular order. Each string consists of upper-case and lower-case English letters, and contains no more than 10 characters.

Output

Print on a single line the number of extra bars you need to buy to satisfy everyone.

ExamplesInput
5 4 3
Twix
Galaxy
Galaxy
Mars
MilkyWay
Output
2
Input
3 1 3
Mars
Mars
Mars
Output
3

加入题单

上一题 下一题 算法标签: