#include <iostream>
#include <vector>
#include <set>
#include <algorithm>
#include <ctime>
using namespace std;

template<class T>
T gcd(T a, T b)
{
    while (a > 0)
    {
        T t = a;
        a = b%a;
        b = t;
    }
    return b;
}

int main()
{
    int N;
    cin>>N;
    vector<int> A(N);
    for (int &a: A)
        cin>>a;

    int m = A[0];
    for (int a: A)
        m = min(a, m);

    set<int> F;
    for (int a: A)
        for (int f=1; f*f<=a; f++)
            if (a%f==0)
                F.insert(f),
                F.insert(a/f);

    int ans = 0;
    for (int f: F)
        if (f<=m)
        {
            int g = 0;
            for (int a: A)
                if (a%f==0)
                    if (g==0)
                        g = a;
                    else
                        g = gcd(g, a);
            if (g==f)
                ans++;
        }
    cout<<ans<<endl;
}

#include<bits/stdc++.h>
using namespace std;

#ifdef LOCAL
#include "debug.h"
#endif

#ifdef LOCAL
#define debug(...) cerr << "[" << #__VA_ARGS__ << "]:", debug_out(__VA_ARGS__)
#else
#define debug(...) 42
#endif

#define endl "\n"
typedef long long ll;
typedef long double ld;
typedef vector<int> vi;
typedef std::vector<vector<int> > vvi;
typedef pair<int, int> pi;
typedef pair<ll, ll> pll;
typedef vector<ll> vll;
typedef vector<pi> vpi;
typedef vector<pll> vpll;
typedef vector<vll> vvll;
typedef vector<vi> vvi;
typedef vector<double> vd;
typedef vector<vector<double>> vvd;
typedef vector<ld> vld;
typedef vector<vld> vvld;
typedef vector<bool> vb;
typedef vector<vb> vvb;


#define rep(i, a, b) for (int i = (int)(a); i < (int)(b); i++)
#define repi(i, a, b) for (int i = (int)(a); i >= (int)(b); i--)
#define pb push_back
#define fi first
#define se second
#define all(a) a.begin(), a.end()
#define sz(a) (int)(a.size())

template<typename T> void umin(T &a, T b) { a = min(a, b); }
template<typename T> void umax(T &a, T b) { a = max(a, b); }

ll nxt() {
	ll x; cin >> x; return x;
}

void setIO(string s) {
	#ifndef LOCAL
	ios_base::sync_with_stdio(0); cin.tie(0); 
	freopen((s+".in").c_str(),"r",stdin);
	freopen((s+".out").c_str(),"w",stdout);
	#endif
}

void yes() {
	cout << "YES\n";
}

void no() {
	cout << "NO\n";
}


const ll mod = 1e9 + 7;
const ll INF = 2e9;

void solve() {
	ll n = nxt();
	vll a(n); rep(i, 0, n) cin >> a[i];

	ll mn = *min_element(all(a));

	map<ll, set<ll>> multiples;
	rep(i, 0, n) {
		ll x = a[i];
		ll mxfac = sqrt(x) + 2;
		for (ll fac = 1; fac <= mxfac; fac++) {
			if (x % fac == 0) {
				multiples[fac].insert(i);
				multiples[x / fac].insert(i);
			}
		}
	}

	ll ans = 1;
	debug(multiples);
	for (auto &it : multiples) {
		if (sz(it.se) == 1) continue;
		ll fac = it.fi;
		ll g = 0;
		for (auto x : it.se) {
			g = __gcd(g, a[x]);
		}
		debug(g, fac, it.se);
		if (g == fac && g < mn) {
			ans++;
		}
	}
	cout << ans << endl;
}

	
int32_t main(){
	// setIO("trapped");
	ios_base::sync_with_stdio(false);
	cin.tie(NULL);

	cout << fixed << setprecision(10);

	int T = 1;
	// cin >> T;

	for (int tc = 1; tc <= T; tc++) {
		// cout << "Case #" << tc << ": ";
		solve();
	}
}
