O Those Fads

No attempts yetTime limit1sMemory limit128 MB

Problem

Like any other teenager, teen cows are occasionally overtaken by fads. Sometimes it's a hula hoop or a pet rock, other times it's Counterstrike, Pokemon, Rick Astley, or tribal tattoos on their udders.

Mathematically, a fad has an initial attractiveness level $L$ ($1 \le L \le 50000$). Cow $i$ has a resistance $R_i$ ($0 \le R_i \le 1000000$) that tells how long she can hold out before joining the fad. When a fad's attractiveness level meets or exceeds a cow's resistance ($L \ge R_i$), that cow wants to participate.

Each cow who participates increases (through peer pressure) the fad's attractiveness by some value $K$ ($1 \le K \le 2500$). Because a higher attractiveness can pull in cows with greater resistance, participation happens in a cascade.

Given a population of $N$ ($1 \le N \le 100000$) cows, determine how many will ultimately participate in the fad.

Input

  • Line 1: Three space-separated integers $N$, $L$, and $K$.
  • Lines 2 to $N+1$: Line $i+1$ contains a single integer $R_i$, the fad resistance of cow $i$.

Output

  • Line 1: A single integer, the number of cows that ultimately participate in the fad.