Cubes
The ghost Petro loves playing with his blocks, arranging them in a line to admire his handiwork. Recently, his friends played a trick on him by placing a mirror in his playroom. As everyone knows, ghosts don't appear in mirrors, but blocks do.
Now, Petro sees N colored blocks in front of him, but he's unsure which blocks are real and which are merely reflections. Can you help Petro figure out how many blocks he might actually have? Petro sees the reflection of all the blocks in the mirror, along with some of the blocks in front of him. There might also be blocks behind him that he cannot see.
Input
The first line of the input contains the number N (1 ≤ N ≤ 100000) and the number of different colors available for the blocks, M (1 ≤ M ≤ 100000). The following line lists N integers ranging from 1 to M, representing the colors of the blocks.
Output
Output all possible values of K that represent the number of blocks Petro might have.