using System; using static System.Console; using System.Linq; using System.Collections.Generic; class Program { static int NN => int.Parse(ReadLine()); static int[] NList => ReadLine().Split().Select(int.Parse).ToArray(); public static void Main() { Solve(); } static void Solve() { var c = NList; var (n, m) = (c[0], c[1]); var a = new int[0]; if (m == 0) ReadLine(); else a = NList; var dp = new bool[n + 1]; foreach (var ai in a) dp[ai] = true; var ans = 0; for (var i = n; i > 0; --i) { if (dp[i]) { foreach (var p in PList(i)) dp[p] = !dp[p]; } else ++ans; } WriteLine(ans); } static List PList(int n) { var ans = new List(); for (var i = 1; i * i <= n; ++i) { if (n % i == 0) { ans.Add(i); if (i * i < n) ans.Add(n / i); } } return ans; } }