Petro-the-ghost loves playing with toy blocks, arranging them in a row to admire his creation. But his friends played a prank on him by placing a mirror in the playroom. As everyone knows, ghosts aren't reflected in mirrors, but blocks are.
Now Petro sees colorful blocks in front of him, but he can't tell which are real and which are just reflections. Help Petro! Determine how many blocks Petro could possibly have in reality. Petro sees the reflection of all blocks in the mirror and some blocks in front of himself. Some blocks might be behind Petro and thus invisible to him.
The first line contains the number (1 \le N \le 100\,000) and the number of different block colors (1 \le M \le 100\,000). The next line contains integers from to — the colors of the blocks.
Output all possible values for the number of blocks Petro might actually have.
Example 1