Under construction

Still being built. Things may change

Elections

Interview

Time limit2sMemory limit1024 MB

Summary
Count the ballots numbered 1 to n that are not divisible by any of the k chosen numbers.
Level

Easy3 of 10

Topics
Array, Implementation
Solved
No attempts yet

Statement

Virtlandia holds a presidential election once every five years. After each vote, the results have to be counted. Here is how ballots are processed in Virtlandia.

There are nn voters, so nn ballots numbered from 1 to nn must be processed. Processing takes kk days. Each day, the election committee picks a natural number, then processes every ballot that has not been processed yet and whose number is divisible by the chosen number. On day ii, all ballots whose numbers are divisible by aia_i are processed. When the process ends, some ballots turned out not to be counted. Find how many ballots remain unprocessed.

Input

The first line contains two integers nn and kk (1≤n≤1051 \le n \le 10^5, 1≤k≤1041 \le k \le 10^4), the number of voters and the number of days for counting. The second line contains kk integers aia_i separated by spaces (2≤ai≤n2 \le a_i \le n), the numbers chosen by the election committee on each day.

Output

Print one integer, the answer to the problem: the number of ballots that remain unprocessed.

Examples1

  1. Example 1

    Input
    8 2
    2 3
    
    Expected output
    3