#include #include #include #define repsec(i,j,n) for(int (i)=(j);(i) < (n);(i)++) #define rep(i,n) for(int (i)=0;(i) < (n);(i)++) using namespace std; int main(){ int n; cin >> n; vector a(n); rep(i,n){ cin >> a[i]; } sort(a.begin(),a.end()); vector dp(n+1); dp[0] = 1; int rec = a[0]; repsec(i,1,n){ if(a[i] % rec == 0){ dp[i] = dp[i-1] + 1; rec = a[i]; }else{ dp[i] = dp[i-1]; } } cout << dp[n-1] << endl; return 0; }