#include int a[200005]; int t[200005], s[200005]; int main() { int n, m; scanf("%d %d", &n, &m); int i, j; for (i = 0; i < m; i++) scanf("%d", &a[i]); for (i = 1; i <= n; i++) t[i] = n / i % 2; for (i = 0; i <= n; i++) s[i] = 0; for (i = 0; i < m; i++) s[a[i]] = 1; int ans = 0; for (i = n; i > 0; i--) { if (s[i] == t[i]) continue; ans++; for (j = 1; j * j <= i; j++) { if (i % j > 0) continue; s[j] ^= 1; if (j * j < i) s[i / j] ^= 1; } } printf("%d\n", ans); return 0; }