#include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
using ll = long long;
constexpr int inf=1e9+7;
constexpr ll longinf=1LL<<60 ;
constexpr ll mod=1e9+7 ;

int gcd(int x, int y){
	return y ? gcd(y, x%y) : x;
}

int main(){
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	int n;
	cin>>n;
	vector<int> a(n);
	rep(i,n)cin>>a[i];
	map<int,int> dp;
	rep(i,n){
		REP(j,1,32000){
			if(j*j>a[i])break;
			if(a[i]%j==0){
				if(!dp.count(j))dp[j]=a[i];
				else dp[j]=gcd(dp[j],a[i]);
				int k = a[i]/j;
				if(!dp.count(k))dp[k]=a[i];
				else dp[k]=gcd(dp[k], a[i]);
			}
		}
	}
	int mi = inf;
	rep(i,n)mi=min(a[i],mi);
	int ans = 0;
	for(auto e: dp){
		ans += e.first <= mi && e.first == e.second;
	}
	cout<<ans<<endl;
	return 0;
}
#include <bits/stdc++.h>
using namespace std;

const int N = 2005;

int n;
int a[N];
map<int , int> mp;

int main()
{
    // freopen(".inp","r",stdin);
    // freopen(".out","w",stdout);
    ios_base::sync_with_stdio(0);
    cin.tie(0);
    cout.tie(0);

    cin >> n;
    for (int i = 1 ; i <= n ; ++i) cin >> a[i];
    sort(a + 1 , a + n + 1);

    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]);
            }
        }
    }

    int ans = 0;
    for (auto x : mp)
    {
        if (x.first > a[1]) break;
        if (x.first == x.second) ++ans;
    }
    cout << ans;

}
