#include <bits/stdc++.h>
using namespace std;
using LL=long long;
using ULL=unsigned long long;
#define rep(i,n) for(int i=0; i<(n); i++)

int GCD(int a,int b){ return b?GCD(b,a%b):a; }

bool sieve[32768]={};
vector<int> P;

vector<pair<int,int>> factorize(int N){
  vector<pair<int,int>> res;
  for(int p:P){
    if(N%p) continue;
    if(N<p) break;
    res.push_back({p,0});
    while(N%p==0){ N/=p; res.back().second++; }
  }
  if(N!=1) res.push_back({N,1});
  return move(res);
}
vector<int> divs(vector<pair<int,int>> F){
  vector<int> res = {1};
  for(auto f:F){
    int t=res.size() * f.second;
    rep(i,t) res.push_back(res[i] * f.first);
  }
  return move(res);
}

int N;
int A[2000];
map<int,int> D;
int m;

int main(){
  cin>>N; rep(i,N) cin>>A[i];
  m=1000000000; rep(i,N) m=min(m,A[i]);
  for(int i=2; i<32768; i++) if(!sieve[i]){
    P.push_back(i);
    for(int j=i*i; j<32768; j+=i) sieve[j]=true;
  }
  rep(i,N){
    auto B=divs(factorize(A[i]));
    for(int d:B){
      int x=D[d];
      if(x==0) D[d]=A[i];
      else D[d]=GCD(x,A[i]);
    }
  }
  int ans=0;
  for(auto d:D) if(d.first==d.second) if(d.first<=m) ans++;
  cout<<ans<<endl;
  return 0;
}

#include <bits/stdc++.h>
using namespace std;

#define ll long long
#define rep(i,a,b) for(int i=a;i<b;i++)
#define FOR(i,a,b) for(int i=a;i<b;i++)
#define FORe(i,a,b) for(int i=a;i<=b;i++)
#define FORr(i,a,b) for(int i=a;i>b;i--)
#define FORre(i,a,b) for(int i=a;i>=b;i--)
#define pb push_back
#define imie(...) " [" << #__VA_ARGS__ ": " << (__VA_ARGS__) << "] "


template<class T> void sort_unique(vector<T> &v){
    sort(v.begin(),v.end());
    v.erase(unique(v.begin(),v.end()),v.end());
}

void solve(){
    int n;
    cin >> n;
    vector<int> a(n);
    rep(i,0,n) cin >> a[i];
    sort(a.begin(),a.end());

    vector<int> v;
    rep(i,0,n){
        for(int k = 1; k * k <= a[i]; k++){
            if(a[i]%k == 0){
                if(k<=a[0]) v.pb(k);
                if(a[i]/k <= a[0]) v.pb(a[i]/k);
            }
        }
    }
    sort_unique(v);

    ll ans = 0;

    int len = v.size();
    rep(i,0,len){
        int factor = v[i];
        int g = 0;
        rep(j,0,n) if(a[j]%factor == 0) g = __gcd(g,a[j]);
        if(g == factor) ans++;
    }
    cout << ans << endl;
}

int main(){
        ios::sync_with_stdio(0);
	    cin.tie(0);
        int t;
        t = 1;
        while(t--){
            solve();
        }
        return 0;
}