Given N and up to 15 divisors, remove multiples of each in order and count how many numbers from 1 to N survive.
Jaehyun plays an integer game with the following rules.
Write a program that counts how many numbers are still written on the paper after the game ends.
The first line contains NNN and KKK. (1≤N≤1091 \le N \le 10^91≤N≤109, 1≤K≤151 \le K \le 151≤K≤15)
The second line contains the KKK elements of AAA in order. Each element is a natural number at most 100100100, and the same number may appear more than once.
Print on the first line how many numbers are still written on the paper after the game ends.
If NNN is 101010 and the array is [2,4,5][2, 4, 5][2,4,5], you erase the multiples of 222, then of 444, then of 555, and the paper keeps 111, 333, 777 and 999.