#include "iostream"
using namespace std;
#include "string"
#include "vector"
#include "unordered_set"
#include "map"
#include "stack"
#include "algorithm"
#include "queue"
#define int long long
#define pi pair<int,int>
#define ff first
#define ss second
#define boost ios::sync_with_stdio(false);cin.tie(nullptr)
#define endl '\n'
#define vi vector<int>

int Gcd(int a, int b) {
    if(b == 0)
        return a;
    return Gcd(b, a % b);
}

int32_t main() {
    boost;
    int n;
    cin >> n;
    vi a(n);
    for(int &i : a)
        cin >> i;
    int mini = *min_element(a.begin(), a.end());
    map<int, int> mp;
    for(int &i : a) {
        for(int j = 1; j * j <= i; j++) {
            if(i % j == 0) {
                mp[j] = Gcd(mp[j], i);
                mp[i / j] = Gcd(mp[i / j], i);
            }
        }
    }

    int ans = 0;
    for(auto x : mp) {
        if(x.ff <= mini && x.ff == x.ss)
            ans++;
    }
    cout << ans << endl;
       
}
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); ++i)
#define srep(i,s,t) for(int i = s; i < t; ++i)
#define drep(i,n) for(int i = (n)-1; i >= 0; --i)
using namespace std;
typedef long long int ll;
typedef pair<int,int> P;
#define yn {puts("Yes");}else{puts("No");}
#define MAX_N 200005

int GCD(int x, int y){
    if(x == 0 && y == 0) return 0;
    if(x>y){
        int swap = x;
        x = y;
        y = swap;
    }
    while(true){
        if(y%x==0){
            return x;
        }else{
            int amari = y%x;
            y = x;
            x = amari;
        }
    }
}

vector<ll> yakusuu_rekkyo(ll n){
    vector<ll> divisors;
    for(ll i = 1; i <= n; i++){
        if(i * i > n)break;
        if(i * i == n){
            divisors.push_back(i);
            break;
        }else if(n % i == 0){
            divisors.push_back(i);
            divisors.push_back(n/i);
        }   
    }
    sort(divisors.begin(), divisors.end());
    return divisors;
}


int main() {
    int n; cin >> n;
    int a[n] = {};
    rep(i,n) cin >> a[i];
    sort(a,a+n);

    set<int> se;
    rep(i,n){
        vector<ll> v = yakusuu_rekkyo(a[i]);
        rep(j,v.size()) se.insert(v[j]);
    }

    int ans = 0;
    for(auto x: se){
        if(x > a[0]) continue;
        int now = -1;
        rep(i,n){
            if(a[i] % x == 0){
                if(now == -1){
                    now = a[i];
                }else{
                    now = GCD(now, a[i]);
                }
            }
        }
        if(now == x) ans++;
    }

    cout << ans << endl;
    return 0;
}


