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

int gcd(int a,int b){
    while(b){
        a=a%b;
        swap(a,b);
    }
    return a;
}

int n,a[2005],mn;
map<int,int> mp;
set<int> s;

int main(){

    ios::sync_with_stdio(false);
    cin.tie(0);
    cout.tie(0);

    cin>>n;
    for(int i=1;i<=n;i++)cin>>a[i];
    mn=*min_element(a+1,a+1+n);
    for(int i=1;i<=n;i++){
        for(int j=1;j*j<=a[i];j++)if(a[i]%j==0){
            mp[j]=gcd(mp[j],a[i]);
            mp[a[i]/j]=gcd(mp[a[i]/j],a[i]);
        }
    }
    for(pair<int,int> p:mp)if(p.first==p.second)s.insert(min(p.first,mn));
    cout<<s.size()<<endl;

    return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define db double
#define ld long double
#define forr(i,a,n) for(int i=a;i<n;i++)
#define rep(i,n) forr(i,0,n)
#define repp(i,n) forr(i,1,n+1)
#define pb push_back
#define mp make_pair
#define vvi vector<vector<int> >
#define MAXN 0x3f3f3f3f
int n,a[2010],ans=0;
set<int>s;
int main(){
	cin>>n;
	rep(i,n)cin>>a[i];
	sort(a,a+n);
	rep(i,n){
		for(int j=1;j*j<=a[i]&&j<=a[0];j++){
			if(a[i]%j)continue;
			s.insert(j);
			if(a[i]/j<=a[0])s.insert(a[i]/j);
		}
	}
	set<int>::iterator it;
	for(it=s.begin();it!=s.end();it++){
		int now=0;
		rep(i,n)if(a[i]%(*it)==0)now=__gcd(now,a[i]);
		if(now==(*it))ans++;
	}
	cout<<ans;
	return 0;
}

