#include <bits/stdc++.h>
#define ll long long
#define INF 1000000007
using namespace std;
vector<ll> A(2001);
map<ll,ll> mapp;
ll bgcd(ll a, ll b)
{
	if (b == 0)
        return a;
    return bgcd(b, a % b); 
	
}
int main()
{
	int N;
	cin>>N;
	A.resize(N+1);
	ll minn=-1;
	for(int i=1; i<=N; i++)
	{
		cin>>A[i];
		if(A[i]<minn || minn==-1)
		{
			minn=A[i];
		}
		for(ll j=1; j*j<=A[i]; j++)
		{
			if(A[i]%j==0)
			{
				mapp[j]=bgcd(mapp[j],A[i]);
				mapp[A[i]/j]=bgcd(mapp[A[i]/j], A[i]);
			}
		}
	}
	ll cnt=0;
	for(auto u: mapp)
	{
		if(u.second==u.first && u.second<=minn)
		{
			cnt++;
		}
	}
	cout<<cnt<<endl;
	
    return 0;
 
}
#include <bits/stdc++.h>
#define rep(i,n) for(ll i=0;i<(n);++i)
typedef long long ll;
using namespace std;

ll gcd(ll a, ll b) {
    if (a % b == 0ll) return b;
    return gcd(b, a%b);
}

ll gcd_multi(vector<ll> A) {
    ll n = A.size();
    ll G = A[0];
    for (ll i = 1; i < n; ++i) G = gcd(G, A[i]);
    return G;
}

int main(int argc, char const *argv[]) {
    ll n; cin>>n;
    vector<ll> a(n);
    rep(i,n) cin>>a[i];

    map<ll, vector<ll>> mp;

    auto div_cnt = [&](const ll m) {
        for (ll i = 1; i*i <= m; ++i) {
            if (m % i == 0ll) {
                mp[i].push_back(m);
                if (i != m/i) mp[m/i].push_back(m);
            }
        }
        return;
    };

    unordered_set<ll> st;
    ll mini = *min_element(a.begin(), a.end());
    st.insert(mini);

    for (auto &&e: a) div_cnt(e);

    for (const auto [div, arr]: mp) {
        if (gcd_multi(arr) == div) {
            if (div <= mini) st.insert(div);
        }
    }

    cout << st.size() << '\n';

    return 0;
}