#include using namespace std; using ll = long long; using vll = vector; #define all(A) A.begin(),A.end() #define rep(i, n) for (ll i = 0; i < (ll) (n); i++) bool chmax(ll& p, ll q) { if (p < q) { p = q; return 1; } else { return 0; } } bool chmin(ll& p, ll q) { if (p > q) { p = q; return 1; } else { return 0; } } int main() { ll N,M; cin>>N>>M; vll A(N+1,0); for(ll i=1;i<=N;i++){ for(ll j=1;j*j<=i;j++){ if(i%j==0){ A[j]=1-A[j]; if(j*j!=i){ A[i/j]=1-A[i/j]; } } } } vll D(N+1,0); rep(i,M){ ll P; cin>>P; D[P]=1; } ll an=0; for(ll i=N;i>0;i--){ if(A[i]!=D[i]){ an++; for(ll j=1;j*j<=i;j++){ if(i%j==0){ D[j]=1-D[j]; if(i!=j*j){ D[i/j]=1-D[i/j]; } } } } } cout<