#include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define sz(x) int(x.size())
#define show(x) {for(auto i: x){cout << i << " ";} cout << endl;}
#define isin(x,l,r) ((l) <= (x) && (x) < (r))
using namespace std;
using ll = long long;
using pii = pair<int,int>;
using pll = pair<ll,ll>;
using tii = tuple<int,int,int>;
template<typename T>bool chmin(T&x,const T&y) {if(x>y){x=y;return 1;} else return 0;}
template<typename T>bool chmax(T&x,const T&y) {if(x<y){x=y;return 1;} else return 0;}

ll gcd(ll a, ll b) { return b ? gcd(b, a%b) : a;}
ll lcm(ll a, ll b) { return a / gcd(a, b) * b;}

vector<int> makeDivisors(int n) {
    vector<int> ret;
    for(int i = 1; i * i <= n; i++) {
        if(n%i == 0) {
            ret.push_back(i);
            if(i*i != n) ret.push_back(n/i);
        }
    }
    sort(ret.begin(), ret.end());
    return ret;
}

int main() {
    int N;
    cin >> N;
    vector<int> A(N);
    rep(i, N) cin >> A[i];
    unordered_map<int, int> mp;
    auto add = [&](int a, int b) {
        int p = mp[b];
        mp[b] = gcd(p, a);
    };
    int l = INT_MAX;
    rep(i, N) {
        vector<int> B = makeDivisors(A[i]);
        for (int b : B) {
            add(A[i], b);
        }
        chmin(l, A[i]);
    }
    ll ans = 0;
    for (auto [k, v] : mp) {
        if (k <= l && k == v) ans++;
    }
    cout << ans << '\n';
    return 0;
    // get dp together, ll, paraphrase, debug
}

// 
#include<iostream>
using namespace std;

long int max(long int a,long int b)
{
 if(a>=b) return a;
 else return b;
}

long int min(long int a,long int b)
{
 if(a>=b) return b;
 else return a;
}


long int gcd(long int a,long int b)
{
 if(a%b==0) return b;
 else return gcd(b,a%b);
}

int main()
{
 int N;
 cin >> N;
 long int ans;
 for(int i=0;i<N;i++){
     long int a_i;
     cin >> a_i;
     if(i==0){
         ans = a_i;
     }
     else{
         ans = gcd(max(a_i,ans),min(a_i,ans));
     }
 }

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