#include <algorithm>
#include <cassert>
#include <iostream>
#include <map>
#include <queue>
#include <set>
#include <vector>

#include <limits.h>

using namespace std;

typedef long long ll;

template<class T>
inline bool chmax(T &a, T b) {
    if(a < b) {
        a = b;
        return true;
    }
    return false;
}

template<class T>
inline bool chmin(T &a, T b) {
    if(a > b) {
        a = b;
        return true;
    }
    return false;
}

const int INF = INT_MAX / 2;

ll gcd(const ll sx, const ll sy) {
    ll x = min(sx, sy);
    ll y = max(sx, sy);
    ll tmp;
    while (x > 0) {
        tmp = y;
        y = x;
        x = tmp % x;
    }
    return y;
}

vector<int> as;

vector<int> calc_divisors(const int a) {
    vector<int> ans;
    for (int i = 1; i * i <= a; i++) {
        if (a % i == 0) {
            if (i * i == a) {
                ans.push_back(i);
            } else {
                ans.push_back(i);
                ans.push_back(a / i);
            }
        }
    }
    sort(ans.begin(), ans.end());
    return ans;
}

int main(void) {
    int N;
    cin >> N;

    int min_a = INF;

    as.resize(N);
    for (int i = 0; i < N; i++) {
        cin >> as[i];
        chmin(min_a, as[i]);
    }

    map<int, int> memo;

    for (int i = 0; i < N; i++) {
        vector<int> divisors = calc_divisors(as[i]);
        for (auto d : divisors) {
            if (memo.find(d) == memo.end()) {
                memo[d] = as[i];
            } else {
                memo[d] = gcd(memo[d], as[i]);
            }
        }
    }

    int ans = 0;
    for (auto kv : memo) {
        const int key = kv.first;
        const int val = kv.second;
        if (key <= min_a && key == val) {
            ans++;
        }
    }
    cout << ans << endl;

    return 0;
}

#include<bits/stdc++.h>

using namespace std;

#define  GODSPEED       ios:: sync_with_stdio(0);cin.tie(0);cout.tie(0);cout<<fixed;cout<<setprecision(15);
#define  f              first               
#define  s              second
#define  newl           cout<<"\n";
#define  pb             push_back  
#define  mset(a,x)      memset(a,x,sizeof(a))
#define  debv(a)        for(auto it: a)cout<<it<<" ";newl;
#define  deb1(a)        cout<<a<<"\n";
#define  deb2(a,b)      cout<<a<<" "<<b<<"\n";
#define  deb3(a,b,c)    cout<<a<<" "<<b<<" "<<c<<"\n";
#define  deb4(a,b,c,d)  cout<<a<<" "<<b<<" "<<c<<" "<<d<<"\n";
#define  uniq(a)        a.resize(unique(a.begin(), a.end()) - a.begin());
#define  all(a)         a.begin(),a.end()           
 
typedef  long long             ll;
typedef  unsigned long long    ull;
typedef  long double           ld;
typedef  pair<ll,ll>           pll;
typedef  vector<ll>            vll;
typedef  vector<pll>           vpll;

const ll   N     =  1e6+5;
const ll   mod   =  998244353 ;
const ll   INF   =  0x7f7f7f7f;
const int  INFi  =  0x7f7f7f7f;

ll n, m, a[2002];
map <ll, ll> g;

void solve(){
	cin >> n;
	for(int i = 1; i <= n; i++){
		cin >> a[i];
		for(int j = 1; j * j <= a[i]; j++){
			if(a[i] % j == 0){
				g[j] = __gcd(g[j], a[i]);
				g[a[i] / j] = __gcd(g[a[i] / j], a[i]);
			}
		}
	}
	int mn = *min_element(a + 1, a + n + 1);
	ll ans = 1;
	for(auto it : g){
		if(it.f < mn && it.s == it.f) ans++;
	}
	deb1(ans)
}

int main(){
	GODSPEED;
	int test = 1;
	//cin >> test;
	for(int i = 1; i <= test; i++){
		solve();
	}
}