1996: 890.能被整除的数

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:13 Solved:4

Description

给定一个整数nm个不同的质数p1,p2,...pm。请你求出1~n中能被p1,p2,...pm中的至少一个数整数的数有多少个?

Input

第一行包含整数nm

第二行为m个质数

Output

输出一个整数,表示满足条件的整数的个数。

Sample Input Copy

10 2
2 3

Sample Output Copy

7

Source/Category