#include <bits/stdc++.h>
using namespace std;
typedef long long ll;  
typedef pair<int,int> ii;
typedef vector <int> vi; 
#define fastio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0)
#define ff first 
#define ss second 
#define f(i,a,b) for(int i = a; i < b; i++)
#define fa(i,a,b) for(int i = a; i >= b; i--)
const int inf=1e9+10;
const ll INF = 1e18+10; 
const ll N=1e5+5;
const ll M=1e7+5;
const ll mod=1e9+7; 

int n, ans; 
int a[2005], mini = inf; 
vector <ii> divi;

int main(){
    fastio; 
    cin >> n; 
    f(i,0,n) {
        cin >> a[i];
        mini = min(mini,a[i]);
    }
    f(i,0,n){
        for(int j = 1; j*j <= a[i]; j++){
            if(a[i]%j == 0){
                divi.push_back({j,a[i]});
                if(a[i]/j != j) divi.push_back({a[i]/j,a[i]});
            }
        }
    }
    sort(divi.begin(), divi.end());
    int id = 0;  
    while(id < divi.size()){
        int comp = divi[id].ff, d = 0; 
        while(divi[id].ff == comp){
            d = __gcd(d, divi[id].ss); id++; 
        }
        if(d == comp and d <= mini) ans++; 
    }
    cout << ans << '\n'; 
    return 0; 
}

#include<bits/stdc++.h>
 
#define IOS ios::sync_with_stdio(false);cin.tie(nullptr)
#define all(x) x.begin(),x.end()
#define pb push_back
#define eb emplace_back
#define mkp make_pair
#define lc(x) ((x)<<1)
#define rc(x) (((x)<<1)|1)
 
using namespace std;
typedef long long ll;
typedef unsigned long long ull;
typedef double ld;
 
const ll LINF=2e18;
const ll MOD=2e18;
const int INF=0x3f3f3f3f;
const int MAXN=100050;
//35000

int a[MAXN];
map<int,int>gcdd;
int gcd(int x,int y)
{
    return y?gcd(y,x%y):x;
}
void mainwork(int T){
	int n;
	scanf("%d",&n);
	for(int i=1;i<=n;i++){
		scanf("%d",a+i);
	}
	sort(a+1,a+n+1);
	int minn=a[1];
	int ans=1;
	for(int i=1;i<=n;i++){
		for(int j=1;j<minn&&j*j<=a[i];j++){
			if(a[i]%j==0){
				gcdd[j]=gcd(gcdd[j],a[i]);
				if(a[i]/j<minn)gcdd[a[i]/j]=gcd(gcdd[a[i]/j],a[i]);
			}
		}
	}
	for(auto i:gcdd){
		if(i.first>=minn)break;
		if(i.second==i.first)ans++;
	}
	printf("%d\n",ans);
}
signed main(){
	//IOS;
	#ifndef ONLINE_JUDGE
	//freopen("./in.txt","r",stdin);
	//freopen("out.txt","w",stdout);
	#endif
	int t=1;
	//scanf("%d",&t);
	//prework();
	for(int i=1;i<=t;i++){
		mainwork(i);
	}
}
