#include #include #include using namespace std; int main(){ int n,m;cin>>n>>m; vector A(m); for(int i = 0; m > i; i++){ cin>>A[m-i-1]; } vector B(n+1); int ans = 0; int nw = 0; for(int i = n; 0 < i; i--){ bool odd = false; if(nw != m && A[nw] == i){ odd = true; nw++; } if(B[i]%2 != odd){ //used for(int j = 1; i >= j*j; j++){ if(i%j == 0){ B[j]++; if(j*j!=i)B[i/j]++; } } }else{ ans++; } } cout << ans << endl; }