#include <bits/stdc++.h>
#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
using namespace __gnu_pbds;
using namespace std;
#define fastio  ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define ll long long
#define pb emplace_back
#define mp make_pair
#define mt make_tuple
#define ff first
#define ss second
#define all(a) a.begin(),a.end()
#define gt(a,b) get<b>(a)
#define endl '\n'
#define l_b lower_bound
#define u_b upper_bound
template<class T> using oset =tree<T, null_type, less<T>, rb_tree_tag,tree_order_statistics_node_update> ;
ll INF = 2147483647000000;
struct custom_hash {
    static uint64_t splitmix64(uint64_t x) {
        // http://xorshift.di.unimi.it/splitmix64.c
        x += 0x9e3779b97f4a7c15;
        x = (x ^ (x >> 30)) * 0xbf58476d1ce4e5b9;
        x = (x ^ (x >> 27)) * 0x94d049bb133111eb;
        return x ^ (x >> 31);
    }

    size_t operator()(uint64_t x) const {
        static const uint64_t FIXED_RANDOM = chrono::steady_clock::now().time_since_epoch().count();
        return splitmix64(x + FIXED_RANDOM);
    }
};
bool compare(ll u,ll v)
{
    return v>u;
}

//unordered_map<long long, int, custom_hash> safe_map;
//oset<ar<int,2>>b,c; insert(),order_of_key(),find_by_order(return pointer);

ll prime[10000001];
ll freq[10000001];
ll co[10000001];
vector<ll> v[10000001];
int main()
{
    fastio
    ll t=1;
    //cin>>t;
    while(t--)
    {
        ll n;
        cin>>n;
        ll arr[n];
        unordered_map<ll,vector<ll>,custom_hash> sm;
        ll mn=INF;
        for(int i=0; i<n; i++) cin>>arr[i],mn=min(mn,arr[i]);
        set<ll> s;
        for(int i=0; i<n; i++)
        {
            for(int j=1; j*j<=arr[i]; j++)
            {
                if(arr[i]%j==0)
                {
                    if(arr[i]/j==j) sm[j].pb(arr[i]);
                    else sm[arr[i]/j].pb(arr[i]),sm[j].pb(arr[i]);
                }
            }
        }
        ll ans=0;
        for(auto it:sm)
        {
            ll gc=0;
            if(it.ff>=mn) continue;
            for(auto itt:it.ss)
            {
                gc=__gcd(gc,itt);
            }
            if(gc==it.ff) ans++;
        }
        cout<<ans+1<<endl;

        // for(auto it: s) cout<<it<<" ";

    }

}
/*
Description
@authors Magneto
@date    2020-10-12 10:59:53
@version 1.2.3
*/
#include <bits/stdc++.h>
#define FAST ios_base::sync_with_stdio(false);cin.tie(nullptr);
#define ll long long
#define l long int
#define f(i, a, b) for(int i=a; i<b; i++)
#define fr(i, a, b) for(int i=a; i>=b; i--)
#define endl '\n'
#define pb push_back
#define pf pop.front()
#define all(x) x.begin(),x.end()
#define debug(x) cerr << #x << " = " << x << endl;
#define lcm(a,b) a*b/__gcd(a,b)


using namespace std;


void solve()
{
l n;
cin>>n;
ll a[n];
for(l i=0;i<n;i++)
cin>>a[i];

ll ans= a[0];
for(l i=0;i<n;i++)
ans = __gcd(ans , a[i]);

cout<<ans<<endl;
}


int32_t main()
{
FAST
l T=1;
//cin>>T;
while(T--)
{
solve();
}
}







