#include using namespace std; #ifdef _RUTHEN #include "debug.hpp" #else #define show(...) true #endif using ll = long long; #define rep(i, n) for (int i = 0; i < (n); i++) template using V = vector; int main() { ios::sync_with_stdio(false); cin.tie(0); int N, M; cin >> N >> M; V A(N + 1, 0); rep(i, M) { int a; cin >> a; A[a] = 1; } V> G(N + 1); for (int i = 1; i <= N; i++) { for (int j = 2 * i; j <= N; j += i) { G[j].push_back(i); } } int ans = 0; for (int i = N; i > 0; i--) { if (A[i] == 0) { ans++; } else { for (auto j : G[i]) A[j] ^= 1; } } cout << ans << '\n'; return 0; }