CF898D Alarm Clock
Description
Every evening Vitalya sets $ n $ alarm clocks to wake up tomorrow. Every alarm clock rings during exactly one minute and is characterized by one integer $ a_{i} $ — number of minute after midnight in which it rings. Every alarm clock begins ringing at the beginning of the minute and rings during whole minute.
Vitalya will definitely wake up if during some $ m $ consecutive minutes at least $ k $ alarm clocks will begin ringing. Pay attention that Vitalya considers only alarm clocks which begin ringing during given period of time. He doesn't consider alarm clocks which started ringing before given period of time and continues ringing during given period of time.
Vitalya is so tired that he wants to sleep all day long and not to wake up. Find out minimal number of alarm clocks Vitalya should turn off to sleep all next day. Now all alarm clocks are turned on.
Input Format
First line contains three integers $ n $ , $ m $ and $ k $ ( $ 1
Output Format
Output minimal number of alarm clocks that Vitalya should turn off to sleep all next day long.
Explanation/Hint
In first example Vitalya should turn off first alarm clock which rings at minute $ 3 $ .
In second example Vitalya shouldn't turn off any alarm clock because there are no interval of $ 10 $ consequence minutes in which $ 3 $ alarm clocks will ring.
In third example Vitalya should turn off any $ 6 $ alarm clocks.