Count integers from 1 to N divisible by at least one of up to 20 given numbers, where duplicates and multiples make plain unions invalid.
Minho has KKK cards. Each card has one positive integer written on it. Minho made up a number game with them.
The game is to count how many positive integers from 1 to NNN are divisible by at least one of the numbers written on the cards.
There are far too many numbers to count by hand. Count them for Minho.
The first line contains NNN and KKK, separated by a space. (1≤N≤1091 \le N \le 10^91≤N≤109, 1≤K≤201 \le K \le 201≤K≤20)
The second line contains the numbers written on the cards, A1,A2,…,AKA_1, A_2, \dots, A_KA1,A2,…,AK, in order and separated by spaces. (1≤Ai≤1091 \le A_i \le 10^91≤Ai≤109)
Several cards may carry the same number.
Print on one line how many positive integers from 1 to NNN are divisible by at least one of the numbers written on the cards.