Airport

No attempts yetTime limit1sMemory limit256 MB

Problem

An airport has GG gates, numbered 11 through GG.

PP planes arrive in a fixed order. Plane ii docks permanently at one gate that is still empty among gates 11 through gig_i. A gate holds at most one plane, and a plane that has docked never moves to another gate. If no gate is left for the plane that is arriving, the airport closes and no further plane arrives.

Dock as many planes as possible. How many planes dock at most?

Input

The first line contains the number of gates GG (1G1051 \le G \le 10^5).

The second line contains the number of planes PP (1P1051 \le P \le 10^5).

Each of the next PP lines contains one integer gig_i (1giG1 \le g_i \le G), the highest gate number that plane ii can use, given in arrival order.

Output

Print the maximum number of planes that can dock, on one line.