Олимпиадный тренинг

Задача 38265. Renumber


In the village of Prostokvashino, part of the houses stopped using paper mail services, switching to electronic mail. In total, there are N houses in the village, of which M have not yet switched to using only e-mail. The postman Pechkin decided to renumber the houses that still use paper mail so that they have numbers from 1 to M. At the same time, Pechkin does not care that houses with neighboring numbers will not stand next to each other. Since the postman does not really want to remember the new numbers for all the houses to which he still carries letters and telegrams, he wants to renumber only some of them. What is the minimum number of houses that would need to be renumbered to be in order

Input
The first line contains two numbers N and M (1<=M<=N<=1000) – the number of houses in Prostokvashino and the number of those houses that still use the services of the postman Pechkin, respectively. The second line contains M numbers ai , (1<=ai<=N) in ascending order – house numbers that still use paper mail.

Imprint
In response, print one number – the minimum number of houses to be renumbered.
Examples
# Input Output Explanations
1 8 5
1 2 4 5 8
1 In the example above, the house that had the number 8 should be given the number 3. Then the 5 houses that still use paper mail will just have numbers from 1 to 5.