Car Parking

No attempts yetTime limit1sMemory limit128 MB

Problem

A parking center next to the Great Wall has one long row of parking places. One end of the row is called the left end and the other one the right end. Every place holds a car. Each car has a type written as an integer, and several cars may share a type.

$W$ workers rearrange the cars so that the types read in ascending order from the left end to the right end. They work in rounds. In one round each worker may drive one car out of its place and then park that car in a place that another car left during the same round, so a round shuffles the cars it touches among the places those cars just gave up. A worker may also stay idle during a round.

The workers want as few cars as possible to end up somewhere else. A car counts as moved when its final place differs from its starting place, no matter how many rounds it spent driving around. Cars of the same type are interchangeable, so a car may finish in the place where another car of the same type started.

Given the types of the parked cars and the number of workers, find the smallest number of cars that have to be moved.

Input

The first line contains three integers. The first one is the number of cars $N$, $2 \le N \le 20000$. The second one is the number of types $M$, $2 \le M \le 50$. The car types are the integers from $1$ to $M$, and at least one car of each type stands in the row. The third one is the number of workers $W$, $2 \le W \le M$. The second line contains $N$ integers, where the $i$th integer is the type of the $i$th car in the row, counted from the left end.

Output

Print one integer, the smallest number of cars that have to be moved so that the types read in ascending order from the left end to the right end.