Integer Game

Given N and up to 15 divisors, remove multiples of each in order and count how many numbers from 1 to N survive.

Medium6MathNumber theoryCombinatoricsBit manipulationNo attempts yetTime limit2sMemory limit512 MB

Problem

Jaehyun plays an integer game with the following rules.

  1. Fix an integer NN and an array AA of length KK.
  2. Write every integer from 11 to NN on a sheet of paper.
  3. Take the first number of AA and remove it from the array. Calling that number xx, erase every multiple of xx written on the paper.
  4. Repeat step 3 until the array is empty.

Write a program that counts how many numbers are still written on the paper after the game ends.

Input

The first line contains NN and KK. (1N1091 \le N \le 10^9, 1K151 \le K \le 15)

The second line contains the KK elements of AA in order. Each element is a natural number at most 100100, and the same number may appear more than once.

Output

Print on the first line how many numbers are still written on the paper after the game ends.

Hint

If NN is 1010 and the array is [2,4,5][2, 4, 5], you erase the multiples of 22, then of 44, then of 55, and the paper keeps 11, 33, 77 and 99.